Saturday, 15 January 2011

autolayout - How to use size classes in xcode6 -



autolayout - How to use size classes in xcode6 -

please, there can help me understand ho utilize size classes in xcode6? i'm designing first time dialer. set different constraints, , have no error message, , in screens (iphone3-4-6-6+) have aligned keys, see keys in same size in screen (that's not me, because need bigger in iphone6 , 6+). how can see right size , right position of object, key, in case? checked boxes in right panel "use size classes" , "use autolayout", , understood have work in different optional screens can select in bottom of work area (any-any, compact-any, etc..) didn't understand after choising screen (example compact-any).

hi per question need when have any-any size class give constraints need mutual views(in case keys).

e.g. : if want view remain same height , width need set constraints in any-any , in when alter custom-any size class need give constraints related leading , trailing.

in any-any need give widths equally,aspect ratio , horizontal , vertical spacing between views.

the constraints highlighted in below image set in any-any size class.

this constraints applied iphones , ipad in both portrait , landscape mode.

in compact-any need set leading,trailing,top , bottom spacing views superview or layout margin.

the constraints selected in below image set in custom-any size class.

this constraints applied iphones in portrait , landscape mode , not applied ipad.

result

here i've not applied bottom constraints views. can set if have more controls.

please refer reply i've given multiple controls auto layout using size class.

http://stackoverflow.com/a/27471120/4101371

you can refer below links has explanation on auto layout using size class.

http://mathewsanders.com/designing-adaptive-layouts-for-iphone-6-plus/

http://mobileoop.com/how-to-use-auto-layout-in-xcode-6-for-ios-7-and-8-development

hope helpful in solving issue.

autolayout xcode6 size-classes

No comments:

Post a Comment