Iphone 应用程序未进入快速枚举循环

Iphone 应用程序未进入快速枚举循环,iphone,objective-c,loops,fast-enumeration,Iphone,Objective C,Loops,Fast Enumeration,经过多次调试后,我确定这段代码忽略了快速枚举循环,并盲目地跳到了末尾: -(void)loadOutAnnotations { NSLog(@"entering Annotation enumeration Loop"); iProspectFresno_LiteAppDelegate *appDelegate =(iProspectFresno_LiteAppDelegate *)[[UIApplication sharedApplication] delegate];

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

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

控制台打印“进入注释枚举循环”和“初始化”,但它似乎完全绕过了枚举循环,因为它没有在循环中打印“我做错了什么?”你确定
appDelegate.mines
不是空的吗?

appDelegates.mines是什么类型的?这有点离题,但是您确实不应该使用委托来保存数组。另外,您在
initWithArray
之后忘记了一个冒号。是的,似乎就是它。我的数据库初始化代码包含:NSLog(@“first if statement”)if(sqlite3_prepare_v2(database,sqlStatement,-1,&compileStatement,NULL)==SQLITE_OK){NSLog(@“second if statement initialized”);}控制台上似乎没有出现“second if statement initialized”(第二条if statement initialized)。为什么不使用核心数据?需要支持3.0之前的设备吗?Id图我将在运行此应用程序后了解核心数据。一种概念证明;是的,我想支持3.0之前的设备。