名字没想好,就暂且叫它 husky
写 husky 动机
自 Masonry
的横空出世,其链式编程的姿势屡试不爽,相比于iOS的书写姿势更见其🐂, Masonry
中能实现这种链式编程方式那么iOS控件创建也一定能实现这种方式,在看完其内部实现后,在闲余时间决定自己将 UIKit 重写一遍达到其一样的效果,希望在开发过程中对开发效率和代码的可读性有一定的帮助。
husky 引入
支持通过
pod husky
可直接下载引入
导入头文件
#import <husky/husky.h>
用法示例
控件创建🌰
1 | [UILabel generator:^(huskyer * _Nonnull huskyer) { |
网络数据请求🌰
1 | [self patch:^(Patcher * _Nonnull patcher) { |
版本设计基线
husky 中几乎涵盖了日常开发过程中用到的对象,后期还会增加一些拓展。
期待更好想法
如果您有更多好的设计和想法,可以加入我们~
赏
使用支付宝打赏
使用微信打赏
若你觉得我的文章对你有帮助,欢迎点击上方按钮对我打赏
扫描二维码,分享此文章