我使用的是類,MapMultiController,它擴展的UIViewController,並從我的ListViewController,這也延伸的UIViewController,像這樣的內部實例:目標c,iPhone開發中的「Unexpected interface name」是什麼意思?
@interface MapMultiController : UIViewController <UINavigationControllerDelegate, UINavigationBarDelegate> {
MKMapView *mapView;
UISegmentedControl *barStyleSegControl;
bool wasUpdated;
}
,然後這樣的:
MapMultiController *controller = [[MapMultiController alloc] initWithNibName:@"MapMultiController" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:YES];
[controller release];
這一切之前工作過,但後來我註釋掉了ListViewController中的分配和所有內容,還做了其他一些事情,現在當我試圖重新將它放回時,它會顯示「意外的接口名稱」MapMultiController'「,當然之後的一切都不起作用。
但是一切對我來說都是正確的!怎麼了?
是什麼MapMultiController.h其餘樣子(特別是位你的問題的代碼之前)? – deanWombourne