UIStackViewMaker 1.2

UIStackViewMaker 1.2

Theo 维护。



  • Theo Though

UIStackViewMaker


创建 UIStackView 实例的快速 API。

多语言翻译

中文 README

主要特性

  • 链式编程 API
  • 提供配置 UIStackView 属性的简单方法
  • 更方便地重新加载或更新排列的视图
  • 立即反转排列视图的顺序

要求

  • iOS 9.0+
  • macOS 10.11+

效果

Demo

安装

CocoaPods

首选的安装方法是使用 CocoaPods。请将以下内容添加到您的 Podfile

pod 'UIStackViewMaker'
手动

将 UIStackViewMaker 目录复制到您的项目中

入门指南

#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);
}];

许可协议

UIStackViewMaker 使用的是 MIT 许可协议