0

经过多次调试,我确定这段代码忽略了快速枚举循环并盲目跳到最后:

-(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
   }
}

控制台打印“进入注释枚举循环”以及“初始化”,但它似乎完全绕过了枚举循环,因为它没有打印“循环中”。我究竟做错了什么?

4

1 回答 1

1

你确定appDelegate.mines不是空的?

于 2010-01-14T05:49:34.770 回答