i have this array called favorites referenced in my app delegate. When i access it in the view controller i use this code
MultiViewAppDelegate *app = (MultiViewAppDelegate *)[[UIApplication sharedApplication] delegate];
[app.favoritesArray addObject:@"one"];
And in the table thats supposed to display this information im trying to ask if the array contains a certain element and if it does to display that item using this code.
NSLog (@"2");
favoritesArray = [[NSMutableArray alloc]init];
didContain = [[NSMutableArray alloc]init];
NSLog (@"3");
if ([favoritesArray containsObject:@"one"])
{[didContain addObject:@"one"];
NSLog (@"4"); }
however the code isnt running after nslog 3... can someone inform me why?