In my app I have 3 UIPopOvers. They appear when user taps buttons in the toolbar. I need to make the popovers appear in the correct place when user rotates iPad if the popover is already opened (like the -willAnimateRotationToInterfaceOrientation:).
How can I do it?
Thanks in advance!
In iOS 7.0 and later, it can be done by implementing following method available in UIPopoverControllerDelegate:
(void)popoverController:(UIPopoverController *)popoverController willRepositionPopoverToRect:(inout CGRect *)rect inView:(inout UIView **)view
For popovers that were presented using the presentPopoverFromRect method, the popover controller calls this method when the interface orientation changes.
The only solution I've found so far is just closing the popover when the device is rotated/
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