Search code examples
ipaduiviewuipopover

what method is called after view is rotated


I want to change position of UIPopover after the view is rotated. can you tell me what method is called after view is rotated so that I can get the coordinates of UI elments in the final view rendered after rotation of view

popover behavior in any Apples native application. You'll see that in response to device rotation popover should disappear before rotation animation and appear again on new appropriate place after it ends. So you should dismiss your popover and then popup it on new place with new coordinates (how to get these coordinates)

Thanx in advance


Solution

  • From the docs for -[UIViewController didRotateFromInterfaceOrientation:]:

    Sent to the view controller after the user interface rotates. … Subclasses may override this method to perform additional actions immediately after the rotation. … By the time this method is called, the interfaceOrientation property is already set to the new orientation.