Prior to iOS 8 my app using UIPopoverController was working fine. I had it anchored and opening up at a size of 400 x 215. However now when i run my app on iPad using iOS 8 my popover window is not sized properly. Its almost popping up at the full height and width off my anchor. Since iOS is so new i can't seem to find an adjustment for this. Below is my code:
UIView *anchor = self.personAnchor;
UIViewController *viewControllerForPopover =
[self.storyboard instantiateViewControllerWithIdentifier:@"choosePersonViewController"];
popover = [[UIPopoverController alloc]
initWithContentViewController:viewControllerForPopover];
popover.popoverContentSize = CGSizeMake(400, 215);
popover.delegate = self;
[popover presentPopoverFromRect:anchor.frame
inView:anchor.superview
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
Set the view controller's preferredContentSize
instead of setting the popover's popoverContentSize
- copied from comment
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With