我的应用在 iOS 5.1 之前工作得非常完美。它是一个 UISplitviewController
,左侧窗格中有一个 UINavigationController
,根据在该 UINavigationController
中所做的选择更新详细窗格。
iOS 5.1 的新侧滑取代了弹出视图,它能够正常工作,但外观不太好看。
在纵向模式下,单击导航栏按钮显示的“弹出视图”似乎已经损坏了。它会引发异常 - 'NSInternalInconsistencyException',reason: 'Unknown direction passed to _popoverViewSizeForContentSize:arrowDirection:'
我尝试使用以下方法覆盖显示弹出视图的方法:
-(void)splitViewController:(UISplitViewController *)svc popoverController:(UIPopoverController *)pc willPresentViewController:(UIViewController *)aViewController
{
[self.popoverController presentPopoverFromBarButtonItem:self.masterPopoverButtonItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
但我仍然收到相同的错误。有人能帮忙吗?