简体   繁体   中英

how to update apps for new iPhone resolution

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!

Normal UI components like buttons etc. should be update with the new SDK - Like on the MBP Retnia. But graphics you have made like images, needs to be update with a bigger dpi - This is only a guess, but that was how it work to MBP Retnia

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM