cmltkt
cmltkt

Reputation: 193

Managing Layouts in iOS

I am new to iOS development, I have a solid background on JAVA Swing and Windows Applications. I want to learn how to do layouting in iOS? I guess iOS doesn't have "Layout Managers" like in Java Swing.. The only way to develop UI is specifying size and positions for every controller?

Upvotes: 3

Views: 2078

Answers (2)

iPatel
iPatel

Reputation: 47099

First Read This Official Documentation.

Also it may be helpful for you.

enter image description here

Here Autoresizing mask and its Description

1) UIViewAutoresizingNone
The view does not autoresize. (This is the default value.)

2) UIViewAutoresizingFlexibleHeight The view’s height changes when the superview’s height changes. If this constant is not included, the view’s height does not change.

3) UIViewAutoresizingFlexibleWidth
The view’s width changes when the superview's width changes. If this constant is not included, the view’s width does not change.

4) UIViewAutoresizingFlexibleLeftMargin
The distance between the view’s left edge and the superview’s left edge grows or shrinks as needed. If this constant is not included, the view’s left edge remains a fixed distance from the left edge of the superview.

5) UIViewAutoresizingFlexibleRightMargin
The distance between the view’s right edge and the superview’s right edge grows or shrinks as needed. If this constant is not included, the view’s right edge remains a fixed distance from the right edge of the superview.

6) UIViewAutoresizingFlexibleBottomMargin
The distance between the view’s bottom edge and the superview’s bottom edge grows or shrinks as needed. If this constant is not included, the view’s bottom edge remains a fixed distance from the bottom edge of the superview.

7) UIViewAutoresizingFlexibleTopMargin
The distance between the view’s top edge and the superview’s top edge grows or shrinks as needed. If this constant is not included, the view’s top edge remains a fixed distance from the top edge of the superview.

For more information read this documentation.

Upvotes: 9

CRDave
CRDave

Reputation: 9285

Yes you are right there is nothing like Layout Managers in iOS SDK.

But it is not hard to manage layout in Xcode.

With use of storyboard and size inspector it become more easy.
and iOS 6 auto-layout make is easier for different size view.

I found something like layout manager but I dont know what exactly it is and how to use.

You can have a look : RKLayout

Upvotes: 1

Related Questions