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.