SplitViewController委託方法我已經加入拆分視圖控制器的視圖控制器上,因爲這樣的:沒有響應
rootViewController = [[RootViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController];
detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];
rootViewController.detailViewController = detailViewController;
splitViewController = [[UISplitViewController alloc] init];
splitViewController.viewControllers = [NSArray arrayWithObjects:navigationController, detailViewController, nil];
splitViewController.delegate = detailViewController;
[self.view addSubview:splitViewController.view];
但在DetailViewController限定的本方法不會被調用:
- (void)splitViewController: (UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController: (UIPopoverController*)pc
如果我設置splitviewcontroller
在window
s,那麼這個方法被調用! 有何建議?
如果我需要這個功能?....只在一個頁面上我需要顯示主/功能 功能...也可以是正確的...因爲我在任何地方都看到在主窗口中添加了splitviewcontroller – addy 2011-12-14 08:15:21