를 입력하지,이 코드는 빠른 열거 루프를 무시하고 맹목적으로 끝까지 뛰어 것으로 확인되었습니다 :응용 프로그램이 많은 디버깅 후 빠른 열거 루프
콘솔 인쇄 "를 입력 주석 열거 루프"-(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
}
}
뿐만 아니라 "초기화 중"으로 표시되지만 열거 루프를 완전히 무시하는 것처럼 보입니다. "루프 안에"인쇄되지 않기 때문입니다. 내가 도대체 뭘 잘못하고있는 겁니까?
appDelegates.mines는 어떤 유형입니까? –
그것의 NSMutableArray –
이것은 조금 벗어난 주제이지만 배열을 유지하기 위해 델리게이트를 사용해서는 안됩니다. 또한,'initWithArray' 다음에 콜론을 잊었다. –