dimanche 31 août 2014

NSArray Retrieving Single Item


Vote count:

0




I seem to be struggling this morning with this one. I have a NSArray that is filled with data. Pretty simple so far. Ultimately I need to retrieve one or more of the items out of the array to simply display on the device. Below



NSArray *myViews = viewsArray;

NSString *activeView = [myViews valueForKey:@"Active"];



I know the Array is correct but for some reason unbeknown to myself I can get one of the items out of the array and set it so I can use it else where. Perhaps a scope issue.


My Array looks like this;



[0]
NSObject
appViewName = (NSString *) @"AcmeAPP"
appActive = (NSString *) @"True"


I have also tried looping over the array but that doesn't seem to work either. Clearly I'm missing something.



asked 1 min ago

Jeremy

121






NSArray Retrieving Single Item

Aucun commentaire:

Enregistrer un commentaire