iPhone 6 (Plus) screen size

↘锁芯ラ 提交于 2019-11-27 21:14:36

It seems like you didn't provide correct launch images to your app. When there is no correct launch images set, the app will run like on iPhone 5/5S, that's why you are having these confusing results while logging. iPhone 6 screen size is 375x667 px scale x2, iPhone 6+ 414x736 px scale x3. So, if you want to set launch image for iPhone 6 it should have 750x1334 px size, and 1242x2208 for iPhone 6+ respectively. Good Luck!

EDIT:

As rmaddy mentioned in the comments, it's better to use launch screen storyboard with proper layout constraints to fit all screens, than having bunch of images for all screens(which also increases the app size).

You have to add Launch Image in Imageasset for iPhone 6 and 6+ with proper resolution.

if you dont know resolution please check right side navigator > choose 3rd option. right now in screenshot you can see Expected size 1242x2208 pixel

please check attached screenshot. once you add this all images then only you will get proper.

for iPhone 6 it will log

Screen width 375 px, height 667 px, scale 2.0x

for 6+

Screen width 414 px, height 736 px, scale 3.0x

Onik IV

Add a Launch Screen to your project, ->File -> New File -> in iOS User Interface -> Launch screen. Then in the General View of your App, select the LaunchScreen.xib in the Launch Screen File field. Try again your code, and you could see the real sizes.

For others who may come into the question:

Make sure your launch image names are not the same with any other pictures in your project, otherwise Xcode may be confused and also returns iPhone 5 width and height.

In my case, I found the settings in iPhone about the display. (Settings - Display & Brightness - DISPLAY ZOOM).

If your setting is "Zoomed", screen width will be 320px.

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