-(void) setupMyLocation {
NSArray *viewControllerArray = [navigationUpdateFromDetail.navigationController viewControllers];
NSUInteger parentViewControllerIndex = [viewControllerArray count] - 2;
NSLog(@"Parent view controller: %@", [viewControllerArray objectAtIndex:parentViewControllerIndex]);
switch(parentViewControllerIndex){
case 0:
self.myLocation = navigationUpdateFromDetail.currentLocation;
break;
case 1:
YANAVAppDelegate *currentObject = (YANAVAppDelegate*)[[UIApplication sharedApplication]delegate];
// self.myLocation = currentObject.givenLocation;
break;
default: break;
}
}
我似乎無法弄清楚爲什麼我不斷收到一個錯誤「期望表達式在YANAVAppdelegate之前」。無法確定的UISharedApplication錯誤
我似乎無法把我的手指放在爲什麼這不會編譯。任何輸入讚賞..預先感謝。
謝謝你,困擾我好30分鐘 – Makinitez21 2010-01-03 10:13:55