The new iPhone is being presented.. it has a new resolution aspect ratio. (1136 x 640)
Does anyone know how to upgrade apps to support the new resolution??
Thanks!
We are using Canappi to generate the Objective-C code that works on both resolutions (and with iPad too). Canappi works like Interface Builder, but in a textual form (which is much easier to use if you ask me). This is how you specify the position of your controls for each resolution and/or form factor:
layout myTabletLayout {
text name (10,60,100,30) { ... }
}
layout myPhoneLayout {
text name (10,60,100,30 + 0,10,0,2) { ... }
tablet myTabletLayout ;
}
the +0,10,0,2 is a shift that is applied to the original coordinates when the app runs on an iPhone 5. That means that you can easily resize tables, space out controls or even, and that's really cool, bring controls which are displayed off screen on the iPhone 4, back into the iPhone 5 view bounds.
frame
/bounds
in your code, and start to use thesize
of the superview. I can't tell you how often I've seen code here explicitly referencing screen dimensions of 320 x 480 or putting buttons on the screen using hard coded coordinates. – Rob