Testing various screen resolutions in the development of Universal applications (iPad, iPhone, iPod)

I notice that when sending a universal application to the application store, there are various screen resolutions for support. I think iPhone / iPod: 320x460, 320x480, 640x960 and iPad 768x1024.

When I specify universal application development in Xcode, the simulator has a resolution of 320x480. To view the screen resolution of 768x1024, I can change the target setting on the iPad, but how do I check the resolutions of 320x460 and 640x960?

My default solution is for iPad and manually hack my code, for example: SCREEN_WIDTH=640, SCREEN_HEIGHT=960;but, of course, there must be a setting on the simulator for this !?

In a related question, is there a way to get screen shots from the simulator (except for the -shift-3 command and crop the resulting image)?

Thanks in advance.

0
source share
1 answer

640x960 is the iPhone 4. You can simply select “iPhone 4” from the simulator’s device menu. You will notice that everything is twice as large (if your computer does not have a small screen).

iPhone 4 will still say that its screen is 320x480 in accordance with [ [UIScreen mainScreen] applicationFrame].sizesee here for a discussion.

460x320 is the standard iPhone / iPod Touch screen minus the size of the status bar. You do not need to maintain it separately from 480x320.

Note. The option "iPhone 4" has been renamed to "iPhone (Retina)" in the latest versions of the simulator.

, .

+2

Source: https://habr.com/ru/post/1787272/


All Articles