Tuesday, 15 July 2014

ios - Problems when trying to support 3.5 and 4 inch screen of iPhone -



ios - Problems when trying to support 3.5 and 4 inch screen of iPhone -

i started development of new app on iphone 5 , have add together back upwards 3.5 inch screens. know, there more space content on 4 screen on 3.5 screen.

when run app on 3.5 screen, whole layout messed up. possible utilize layout on 4 inch screen, place layout within scroll view when run on 3.5 screen?

my thought scroll page rather redesigning it. how can accomplish that?

(or maybe somehow possible design layout 3.5 screen , 4 screen seperately)?

it totally possible design different layouts 3.5 , 4 inch screens. need add together :

#define is_iphone_5 (((double)[[uiscreen mainscreen] bounds].size.height) == ((double)568))

and build separate cases, using if (is_iphone_5) {do this...} else {do that...}

but

this should done lastly resort, because require lot of manual/extra coding. should ideally create view in such way automatically adjusts both screens. , can in 2 ways :

1)with auto-layout i.e applying constraints on , between each view element. (personally don't lot)

2)without autolayout, applying auto-resizing masks on each of view elements. (and checking toggling form factor button in storyboard)

iphone ios cocoa-touch interface-builder iphone-5

No comments:

Post a Comment