我的 View 表示有一个奇怪的行为。
我的结构:
Window -> MyTabbarController -> GraphViewController -> (modal) SelectItemViewController;
窗口设置:
在我将我的应用更新为Retina 4 分辨率之后(并将 Window.xib 中的 UIWindow
大小设置为 Retina 4 全屏) ,myTabbarController
的 origin
在 Retina 3.5 设备 中设置为 0,88(在 retina 4 中没有问题)。
如果我使用非模态
Controller ,我可以轮换到最后一天,一切正常。
但是如果我在 UIInterfaceOrientationLandscapeLeft
中调用模态视图
(对于 UIInterfaceOrientationLandscapeRight
一切正常)或者关闭
modalView
在相同的状态下,GraphViewController
(MyTabbarController
) 的 parentView
得到一个错误的框架...
调用模态视图:
关闭模态视图
我很感激每一个帮助。
ps:将 UIWindow
大小设置为 Retina 3.5 fullscreen 或 freeform 会使它在 iPhone 5 中看起来不对.还设置 modalPresentationStyle
不做任何事情:/
最佳答案
通过在代码中设置窗口大小解决了问题:
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
window.frame = [UIScreen mainScreen].bounds;
window.rootViewController = tabBarController;
...
设置后,框架始终设置在正确的位置。
我认为这只是 View 绑定(bind)到窗口的问题,以及它在这个“容器”中的方向(屏幕的“宽度”为 480 但框架为 568 横向模式下的像素。灰色部分就是模态视图右侧(非边界)的差异(88 像素)
关于ios - Retina 3.5 在模态视图中旋转到 UIInterfaceOrientationLandscapeLeft 后原点错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17021480/