UIPopoverController automatically resizing to max height on pushViewController

后端 未结 13 683
感情败类
感情败类 2020-12-07 10:45

I have a popover containing a UINavigationController. I can display the popover fine, and it contains the navController just fine. The navController contains a tableView a

13条回答
  •  忘掉有多难
    2020-12-07 11:28

    For iOS 7 use the following:

    - (void)viewDidLoad
    {
        [super viewDidLoad];
    
        CGSize size = CGSizeMake(320, 768); // size of view in popover
        self.preferredContentSize = size;
    }
    

    UIViewController.contentSizeForViewInPopover has been deprecated first in iOS 7.

提交回复
热议问题