UIPopover Calibration

I have a UIPopoverController that I'm trying to show from a UIBarButtonItem in the navigation bar. Despite setting the resize mask for the table inside the viewController content, it occupies the entire height of the screen. The only thing that affects the size of the content is menuPopover.contentViewController.view setFrame:CGRect . I use the code below to show a popover inside the left side of a UISplitViewController

  // menuPopover and editVc are properties on the parent viewController menuPopover = [[UIPopoverController alloc] initWithContentViewController:editVc]; [menuPopover presentPopoverFromBarButtonItem:btnMenu permittedArrowDirections:UIPopoverArrowDirectionAny animated:true]; [menuPopover setPopoverContentSize:CGSizeMake(400, 500) animated:true]; [menuPopover.contentViewController.view setFrame:CGRectMake(0,0,400, 500)]; 

But this is what I see. The arrow shows where there was a menu button that showed a popover:

http://imageshack.us/photo/my-images/545/screenshot20120312at191.png/

It is as if viewing content is simply expanding vertically.

+4
source share
1 answer

The solution was to set the transition to Popover in IB, to set the size of the view in the storyboard. Use explicit size must be unchecked for the ViewController control panel.

+2
source

Source: https://habr.com/ru/post/1401044/


All Articles