iPhone 6和6加上错误的框架,界限值 [英] iPhone 6 and 6 plus giving wrong frame, bounds values

查看:125
本文介绍了iPhone 6和6加上错误的框架,界限值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序是基于Xcode 5.1.1构建的,但是一旦在Xcode 6上升级,面对帧大小的问题,根据新的大小,iPhone 6的分辨率为750x1334但是,输出480x300,任何人都遇到了与iOS 8相同的问题, iPhone 6甚至是iPhone 6 plus模拟器

I have my app build on Xcode 5.1.1 but once upgraded on Xcode 6 facing the problem with frame size as per new sizes iPhone 6 has 750x1334 resolution but, getting output 480x300 does anyone has faced the same problem with iOS 8, iPhone 6 or even on iPhone 6 plus simulators

只需运行应用程序和NSLog以下行

just run the app and NSLog the following lines

NSLog(@"Width - %f, Height - %f",self.view.frame.size.width,self.view.frame.size.height);
NSLog(@"Width - %f, Height - %f",self.view.bounds.size.width,self.view.bounds.size.height);

输出:

宽度 - 480.000000,高度 - 300.000000
宽度 - 480.000000,高度 - 300.000000

Width - 480.000000, Height - 300.000000 Width - 480.000000, Height - 300.000000

我从iOS 8中知道bound.size取决于方向但我的问题是为什么它给我480x300实际位置667x355

I know from iOS 8 bound.size is orientation dependent but my question is why it giving me 480x300 in place of actual 667x355

推荐答案

您点击 MainWindow.Xib 并选择窗口

右侧头部在FullScreen上的复选标记中显示属性检查器在启动时可见并且在启动时可见我在图像上写下设置关注我们

Right Head side Show the Attribute inspector in checkmark on FullScreen At Launch And Visible At Launch and i write Down setup on Image Follow us

这篇关于iPhone 6和6加上错误的框架,界限值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆