autolayout - iOS Layout - Whats the best solution? -


for ios app working on, need manage controls displayed on screen based on type of device app running on.

i try explain theoretical example (the actual numbers used below not important, interests me best method achieve desired result).

example:

enter image description here enter image description here

in case of app in screenshots, button overlaps uiimageview should not displayed @ or displayed in place on screen.

so far i've worked autolayout , , figure, there's no way xcode like: hey, class size "compact width / compact height" , want hide these buttons...but show them "regular width / compact height" .

i did googling , saw people talk using different storyboards based on device; thinking, add/remove buttons dynamically based on device type , think it's not pleasant have add of constraints hand (programatically is).

so resume, appreciate suggestion of 'best' way , best meaning combination of 'not hard' + ' not long'. also, code example (or links) highly appreciated.

thank in advance !

i think depends how sophisticated gets doing overall. when @ developer's code large app projects little done in interface builder since apps dynamic it's work in ib.

using multiple storyboards 'sounds' idea, isn't. if want update/change one, in cases have change other ones well.

what think handy:

use 1 storyboard (or multiple different parts of app , not parallel ones) , put in 'special' cases multiple viewcontrollers of same class different size single storyboard. way won't forget updating second (and third) because right there.

i use multiple 'parallel' storyboards apps support iphone , ipad , makes sense split them up..

also:

i fas possible still use 1 representation , derive other 'versions' in code. if build structured user interface can reuse (or inherit) code 'hides' parts of first viewcontroller in next. way code , ib files won't cluttered.

also think internationalisation (if part of future plans), since multiple ib documents , multiple instances of same viewcontroller layout don't ;)


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -