【文件属性】:
文件名称:ios-iOS链式编程.zip
文件大小:297KB
文件格式:ZIP
更新时间:2022-07-31 13:13:10
其他
基础控件实现链式编程,例如
UILabel *label = [[UILabel alloc] init];
label.labelChain // 取到labelChain
.font([UIFont systemFontOfSize:13])
.text(@"链式作死")
.textColor([UIColor greenColor])
.viewMaker() // 调用到UIView的链
.frame(CGRectMake(20, 100, 100, 40))
.backgroundColor([UIColor whiteColor])
.addToSuperView(self.view)
.labelMaker() // 可以再回调到label链
.textAlignment(NSTextAlignmentCenter)
.layerMaker() // 调到layer链
.cornerRadius(5)
.borderColor([UIColor redColor].CGColor)
.borderWidth(1.f);
详情见:https://github.com/tengshuq/ChainFunction/tree/master