iPad – uipopover and direction change

In my application, I have 3 UIPopOver. When the user clicks the button in the toolbar, they will appear. When the user rotates the iPad, if the pop-up window is already open, I need to make this popovers appear in the correct position (such as -willAnimateRotationToInterfaceOrientation:).

What should I do?

Thanks in advance!

In iOS 7.0 and later, it can be done by implementing the following methods available in UIPopoverControllerDelegate :

(void)popoverController :((UIPopoverController *)popoverController willRepositionPopoverToRect:(inout CGRect *)rect inView:(inout UIView **)view

For using presentPopoverFromRect method The pop-up window that is presented, when the interface orientation changes, the pop-up window control calls this method.

In my application, I have 3 UIPopOver. When the user clicks on the tool When the button in the bar, they will appear. When the user rotates the iPad, if the pop-up window is already open, I need to make this popovers appear in the correct position (such as -willAnimateRotationToInterfaceOrientation:).

I What should I do?

Thanks in advance!

In iOS 7.0 and later, you can implement the following methods available in UIPopoverControllerDelegate To complete:

(void)popoverController :((UIPopoverController *)popoverController willRepositionPopoverToRect:(inout CGRect *)rect inView:(inout UIView **)view

For using The pop-up window presented by the presentPopoverFromRect method, when the interface orientation changes, the pop-up window control calls this method.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 959 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.