简单的堆栈布局视图拉伸子视图:NNStackView

分享到:
简单的堆栈布局视图拉伸基于NNStackViewOrientation子视图(水平或垂直).
image.jpg

Demo

Build and run the project in Xcode to see NNStackView in action. App Delegate loads the DemoViewController

Example Usage

NNStackView *stackView = [[NNStackView alloc] initWithFrame:frame]; // Or bind the view to outlet 
[stackView add:view]; // Adding sub view
[stackView updateOrientationTo:NNStackViewOrientationHorizontal]; // Updates the orientation
[stackView removeLastView]; // Removes the last added view
NNStackViewMargin margin* = [NNStackViewMargin create:10 right:10 top:20 bottom:20 between:10];
stackView.margin = margin; // Sets the margin, currently requires additional updateViewPositions call ...
[stackView updateViewPositions]; // Refreshes the stack view sub views

项目主页:http://www.open-open.com/lib/view/home/1416984790346

昵    称:
验证码:

相关文档: