⬆️ ⬇️

Developer, do not be afraid of the new iPhone

Many developers expect new problems from the release of the new iPhone, since almost no one doubts that the resolution of its screen will be greater than that of the iPhone 4 and 4S. Every day there are more and more confirmations that the new iPhone will get a screen with a resolution of 640x1136, that is, it will stretch to a height.





And one more confirmation: the programmer Cédric Luthi with the nickname 0xced published in his blog a post shedding light on how the screenshots of iOS Simulator were taken from yesterday's news from 9to5Mac. A simple change in the configuration files of iOS Simulator leads to its launch in the currently non-standard resolution of 640x1136 (it is possible in others, as I understood it).



Problems



I tested this tweak first on the current Xcode and iOS Simulator 5.1 - all of my applications (especially those on Cocos2D) floated to a greater or lesser extent. Somewhere there were black holes, somewhere the elements are positioned relative to each other not as the programmer suggested. Applications on Cocos2D version 1.x do not work well with the orientation of the device, more precisely, they do not work at all. I was terrified.



ios5.1 in 640x1136ios5.1 in 640x1136 2

')

If you or your team in the App Store already have a lot of applications - such an extraordinary event will cause a lot of headaches. It will be necessary to update each application, correct all the flaws in the layout, eliminate hard bindings to the screen size, and the like.



But do not worry much! Apple thought about users and developers: in the App Store, quite a few applications no longer receive any support or updates - you can't just leave them to fend for themselves and letting them look on a new iPhone is just awful!



Decision



ios6

I ran Xcode and iOS Sumulator 6 with the same tweak and found what I had intended. To prevent the application interface from “floating”, Apple added the following feature in iOS 6: when you start an old, non-adapted application, black bands are added at the top and bottom of the screen, which cut the available space on the screen to 3: 2 (or 2: 3, depending on which orientation), and the application looks fine. Note that this property does not have iOS 5, from which it can be concluded that the iPhone 5 (or 6?) Will be released immediately on the new iOS.

ios6.0 in 640x1136ios6.0 in 640x1136



So, dear colleagues, if you had concerns about the new resolution, you can not worry much - with the release of the new iPhone, negative feedback about your applications related to the disturbed appearance is unlikely to increase. There will be enough time to bring the interface in order, and the innovation of iOS 6 - Auto Layout , migrated from Mac OS - will help you with this.



UPD

What is especially interesting is that on an stretched simulator for iOS 6 all applications (and system ones too), except for SpringBoard, work in black frames. At the same time, all system applications on a stretched simulator with iOS 5.1 look good and work on the whole screen. Most likely, some parameter must be added to the Info.plist of the application so that it runs in iOS 6 full screen, and iOS 5 just still doesn’t know about it, and it starts up as is.



The answer to the question "How does the keyboard behave in this mode?"




The answer to the question "Already the status bar should be exactly on top of the screen ..."
Yes, there is a glitch ( video ) when calling the Notification Center (svayp on top of the screen, as on the device):



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



All Articles