UISplitView new slide-in popover becomes fullscreen after memory warning in iOS 5.1

岁酱吖の 提交于 2019-11-30 21:28:13

I had the same problem, but I used this code to solve the problem:

-(void)splitViewController:(UISplitViewController *)svc popoverController:(UIPopoverController *)pc willPresentViewController:(UIViewController *)aViewController
{
    aViewController.view.frame = CGRectMake(0, 0, 320, self.view.frame.size.height);
}

Apparently when a memory warning is received, the view controller gets released, so when it presents itself again, it gets it's size from it's parent view, which is full screen. So you just have to reset the frame every time it gets loaded.

I had the same trouble.

You should add below code to AppDelegate.

splitViewController.presentsWithGesture = NO;

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!