Application not entering Fast Enumeration loop
-
20-09-2019 - |
Question
after much debugging, I have determined that this code is ignoring the fast enumeration loop and blindly jumping to the end:
-(void)loadOutAnnotations
{
NSLog(@"entering Annotation enumeration Loop");
iProspectFresno_LiteAppDelegate *appDelegate =(iProspectFresno_LiteAppDelegate *)[[UIApplication sharedApplication] delegate];
FlipsideViewController *viewController = (FlipsideViewController *)[[UIApplication sharedApplication] delegate];
CLLocationCoordinate2D workingCoordinate;
NSLog(@"initializing");
NSMutableArray* mines = [[NSMutableArray alloc] initWithArray(NSMutableArray *)appDelegate.mines];
for (id mine in mines)
{
NSLog(@"in the loop");
//rest of loop code
}
}
the console prints "entering Annotation enumeration Loop" as well as the "initializing," but it seems to bypass the enumeration loop completely, as it is not printing "in the loop." what am I doing wrong?
Solution
Are you sure appDelegate.mines
is not empty?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow