I recently installed Xcode 7 beta and found something new in object library like
Horizontal stack view and Vertical stack view.
When i put some controls inside it, stackview seems to be resizable according to the control size. When i present more controls the stack seems to be adjust automatically as of the stack view. Either adjusting horizontally or vertically?
Is it derived from some other mobile platform
A major advantage of using
UIStackView
is it uses Auto Layout to position and size its arrangedUIViews
. Therefore you dont need to worry about positioning UIViews in aUIStackView
.For a horizontal stack, this means the first arranged view’s leading edge is pinned to the stack’s leading edge, and the last arranged view’s trailing edge is pinned to the stack’s trailing edge. You can try by inserting two or more controls to a horizontal stack view,how they align horizontally w.r.t each other.For how to use
Here is a detail tutorial from raywenderlich site:
http://www.raywenderlich.com/114552/uistackview-tutorial-introducing-stack-views
For More,Please have a look at https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIStackView_Class_Reference/index.html