0
當使用UISplitViewController
,我可以使UIPopoverController
時,該設備上的縱向,並用以下方法,對景觀禁用:在外觀上啓用UISplitViewController的UIPopoverController
// Popover is accessed with a swipe to right gesture
- (void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc {
_popover = pc;
}
- (void)splitViewController:(UISplitViewController *)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {
_popover = nil;
}
然而,如果用戶已經在縱向加載視圖時,不會啓用彈出窗口,除非用戶將設備旋轉到橫向,然後再回到縱向。我想知道如何在視圖出現時從一開始啓用它。