简体   繁体   English

接口方向更改时的iOS6更新视图

[英]IOS6 Update view when interface orientation change

I need to reposition a UIPopoverController when interface orientation change. 接口方向更改时,我需要重新定位UIPopoverController。 In io5 I just did everything in: willRotateToInterfaceOrientation 在io5中,我只是在执行以下操作: willRotateToInterfaceOrientation

I know I can listen to UIDeviceOrientationDidChangeNotification in IOS6, but I only want interface orientation calls. 我知道我可以在IOS6中收听UIDeviceOrientationDidChangeNotification ,但是我只想要接口定向调用。

The ideas behind ios6 rotation are that some views, like popovers, dont really have an orientation. ios6旋转背后的想法是某些视图(如弹出窗口)实际上没有方向。 as they dont fill the screen. 因为他们不填满屏幕。

To re-layout the view as the size of the popover changes layout your view in -(void)viewWillLayoutSubviews in your popover's content view controller and ajust the views as needed to the new size. 要根据弹出窗口的大小更改布局视图,请在弹出窗口的内容视图控制器的-(void)viewWillLayoutSubviews中布局视图,并根据需要将视图调整为新大小。 Animatable changes are animated. 可动画显示的动画。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM