CocoaPods trunk is moving to be read-only. Read more on the blog, there are 11 months to go.

UIStackViewMaker 1.2

UIStackViewMaker 1.2

Maintained by Theo.



  • By
  • Theo Though

UIStackViewMaker


Fast API to make a UIStackView instance.

Multilingual translation

Chinese README

Main Features

  • Chain programming API
  • Provide a easy way to config UIStackView property
  • More conveniently reload or update arraged views
  • Immediately reverse arraged views's order

Requirements

  • iOS 9.0+
  • macOS 10.11+

Effects

Demo

Installation

CocoaPods

The preferred installation method is with CocoaPods. Add the following to your Podfile:

pod 'UIStackViewMaker'
Manual

Copy UIStackViewMaker directory in your project

Getting Started

#import <UIStackViewMaker/UIStackView+STMaker.h>

...

UIStackView * contentStackView = [UIStackView.stMake stConfig:^(STStackViewConfig * _Nonnull config) {
    config.stVer.stDistributeFill.stAlignLead.stInsets(UIEdgeInsetsMake(5, 0, 0, 0));
}];
[contentStackView stGroupItems:^(STStackItemMaker * _Nonnull make) {
    make.stView(self.nameLabel).stTrailSpacing(5);
    make.stView(self.messageLabel);
}];

License

UIStackViewMaker is MIT-licensed.