How to make UIPopoverController keep same position after rotating?

前端 未结 13 1132
粉色の甜心
粉色の甜心 2021-01-30 18:21

I can\'t keep popover the same position on the screen after rotation. Is there any good way to do that, because just setting some frame to popover works terrible after rotating.

13条回答
  •  梦毁少年i
    2021-01-30 18:33

    You can do this in didRotateFromInterfaceOrientation: method of the view controller that you used to present the popover.

    Use setPopoverContentSize:animated: method for setting the size of the popover.

提交回复
热议问题