我設立一個使用SplitViewController的iPad應用程序。在我的應用程序委託我在didFinishLaunchingWithOptions如下:混淆UINavigationControllers在SplitViewController
UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
UINavigationController *leftNavController = [splitViewController.viewControllers objectAtIndex:0];
LeftViewController *leftViewController = (LeftViewController*)[leftNavController topViewController];
DetailViewController *detailViewController = [splitViewController.viewControllers objectAtIndex:1];
NSLog(@"Detail View Ctrl >> %@", [detailViewController class]);
當我運行應用程序時,的NSLog語句返回「的UINavigationController」當DetailViewController實際上是的UIViewController的子類。但是,在XCode中,代碼完成將顯示在DetailViewController子類中實現的所有方法。有任何想法嗎?謝謝!