ChainProperty 1.0.3

ChainProperty 1.0.3

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布上次发布2017年1月

ShadyLew 维护。



  • ShadyLew

使用方式

#import "UIView+ChainProperty.h"

    UITextField *tf1 = [UITextField new];
    [self.view addSubview:tf1];
    //必须以propertyConfigure开头
    tf1.propertyConfigure.frame(CGRectMake(0, 200, 300, 50)).backgroundColor([UIColor redColor]).text(@"whata nice day")
    .textColor([UIColor blackColor]).borderColor([UIColor yellowColor]).borderWidth(0.5).textAlignment(NSTextAlignmentCenter);

    UIButton *btn = [UIButton new];
    btn.propertyConfigure.normalTitle(@"normalTitle").selectedTitle(@"selectedTitle").normalTitleColor([UIColor blackColor]).
    selectedTitleColor([UIColor yellowColor]).frame(CGRectMake(0, 300, 100, 50)).backgroundColor([UIColor greenColor]).fontSize(15);
    [btn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];