objective c - Read and store multiple NSArray -
can store info multiple nsmutablearrays in objective c single plist file? if how write file , how read it? or need separate file each array want store?
i typically read, 1 array:
nsarray *array = [[nsarray alloc] initwithcontentsoffile:filepath];
you either save array or dictionary contains 2 arrays want save.
nsarray *botharrays = [[nsarray alloc] initwithcontentsoffile:filepath]; nsassert(!botharrays || botharrays.count == 2, @"expecting array nil or contain 2 items"); nsarray *first = [botharrays firstobject]; nsarray *second = [botharrays lastobject];
objective-c xcode file nsarray plist
No comments:
Post a Comment