iPhone 6 and 6 plus giving wrong frame, bounds values [duplicate]

帅比萌擦擦* 提交于 2019-12-01 15:25:24

问题


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

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);

output:

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

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


回答1:


You Click on MainWindow.Xib and Select The Window

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



来源:https://stackoverflow.com/questions/26232686/iphone-6-and-6-plus-giving-wrong-frame-bounds-values

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!