我有一個與UIViewController有關的問題,請在您回答之前先閱讀,它比看起來更復雜。無需更改超級UIViewController旋轉工作沒有問題!UISpliViewController DetailView旋轉後消失
我在人像方向的UISplitViewController,比我克利克的按鈕顯示UIPopoverController 現在我改變的UIViewController從UISplitViewC到UITableViewC 現在我旋轉的iPad爲橫向 最後切換回SpliViewController! 正如您所看到的,MasterViewController未顯示,NavigationItem也不會消失。
這使我的假設是,SPLITVIEW的委託函數不叫上的UITableViewController(毫無疑問)的旋轉
我該怎麼處理這個問題?
授職能
- (void)splitViewController: (UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController: (UIPopoverController*)pc {
//debug_NSLog(@"Entering portrait, showing the button: %@", [aViewController class]);
barButtonItem.title = @"Akten";
[self.navigationItem setLeftBarButtonItem:barButtonItem animated:YES];
[self setMasterPopover: pc];
}
// Called when the view is shown again in the split view, invalidating the button and popover controller.
- (void)splitViewController: (UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {
//debug_NSLog(@"Entering landscape, hiding the button: %@", [aViewController class]);
[self.navigationItem setLeftBarButtonItem:nil animated:NO];
[self setMasterPopover: nil];
}
感謝您的幫助!
同樣的問題在這裏。如果你解決了,你可以發佈你如何做?謝謝 – masgar 2013-05-16 20:41:22