UIPopoverController not set correctly in iOS 8

Prior to iOS 8, my application using the UIPopoverController worked fine. I did this at anchor and opened with a size of 400 x 215. However, now when I launch my application on the iPad using iOS 8, my popover window is not sized properly. It almost pops up to its full height and width from my anchor. Since iOS is so new, I cannot find corrections 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]; 
+5
source share
1 answer

Install a controller like preferredContentSize instead of setting popover popoverContentSize - copied from a comment

+5
source

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


All Articles