iPhone 6 and 6 plus giving wrong frame, bounds val

2019-02-21 18:43发布

This question already has an answer here:

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条回答
该账号已被封号
2楼-- · 2019-02-21 19:16

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

enter image description here

查看更多
登录 后发表回答