开发者

Application not entering Fast Enumeration loop

开发者 https://www.devze.com 2022-12-16 03:32 出处:网络
after much debugging, I have determined that this code is ignoring the fast enumeration loop and blindly jumping to the end:

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 Lo开发者_StackOverflow中文版op");

    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?


Are you sure appDelegate.mines is not empty?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号