- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration { [toolsPopoverController dismisspopoverAnimated:YES]; }
有没有人知道在Pages / Numbers中实现相同效果的最佳方法?
谢谢!
解决方法
If the user rotates the device while a popover is visible,the popover controller hides the popover and then shows it again at the end of the rotation. The popover controller attempts to position the popover appropriately for you but you may have to present it again or hide it altogether in some cases. For example,when displayed from a bar button item,the popover controller automatically adjusts the position (and potentially the size) of the popover to account for changes to the position of the bar button item. However,if you remove the bar button item during the rotation,or if you presented the popover from a target rectangle in a view,the popover controller does not attempt to reposition the popover. In those cases,you must manually hide the popover or present it again from an appropriate new position. You can do this in the didRotateFromInterfaceOrientation: method of the view controller that you used to present the popover.
看起来通过在willAnimateRotationToInterfaceOrientation:方法中调用[toolsPopoverController dismisspopoverAnimated:YES],您将在旋转过渡期间隐藏弹出窗口时忽略动画.
如果在didRotateFromInterfaceOrientation:方法中调用dismisspopoverAnimated:YES方法,则在调用dismiss动画之前,应在新位置使用popover的默认行为.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。