我有一個要導航到UISplitView(另一種觀點完全內),像這樣的應用程序:這是主要的導航屏幕上做現在如何手動創建UISplitView?
- (void) switchToMyDayView {
NSLog(@"Show My Day Screen");
if (self.myDayController.view.superview == nil) {
if (self.myDayController == nil) {
MyDayController *myController = [[MyDayController alloc] initWithNibName:@"MyDay" bundle:nil];
self.myDayController = myController;
[myController release];
}
[homeScreenController.view removeFromSuperview];
[self.view insertSubview:self.myDayController.view atIndex:0];
}
}
,該MyDayController有一個XIB叫MyDay.xib其中有以下項目:
File's Owner: MyDayController
First Responder: UIResponder
Split View Controller
---->Navigation Controller ---->Navigation Bar ----> Table View Controller ----> Navigation Item ---->View Controller
所以,我需要一些更多的組件在這裏,我需要一個UITableViewController和UISplitViewControllerDelegate是否正確?
我打算只在MyDayController中實現這些協議,是這種標準嗎?
所以,上面的代碼後,我得到一個錯誤:
- [UIViewController中_loadViewFromNibNamed:束:]加載的「MyDay」筆尖但沒有設置視圖出口。
那麼,我怎樣才能解決它使用UISplitViewController?我知道UISplitViewController有一個視圖屬性,但我不能在IB中使用它/連接它嗎?
非常感謝
馬克