美文网首页
常用的属性定义,方便加入代码块

常用的属性定义,方便加入代码块

作者: LinVilk | 来源:发表于2017-05-19 10:12 被阅读0次

    /**注释*/

    @property (nonatomic, strong) UILabel *

    /**注释*/

    @property (nonatomic, strong) UIButton *

    /**注释*/

    @property (nonatomic, strong) UIImage *

    /**注释*/

    @property (nonatomic, strong) UITableView *

    /**注释*/

    @property (nonatomic, strong) UITableViewCell *

    /**注释*/

    @property (nonatomic, strong) UICollectionView *

    /**注释*/

    @property (nonatomic, strong) UICollectionViewFlowLayout *

    /**注释*/

    @property (nonatomic, strong) UICollectionViewCell *

    /**注释*/

    @property (nonatomic, strong) UIImageView *

    /**注释*/

    @property (nonatomic, strong) NSArray *

    /**注释*/

    @property (nonatomic, strong) NSMutableArray *

    /**注释*/

    @property (nonatomic, assign) BOOL

    /**注释*/

    @property (nonatomic, assign) NSInteger

    /**注释*/

    @property (nonatomic, copy) NSString *

    /**注释*/

    @property (nonatomic, strong) NSString *

    /**注释*/

    @property (nonatomic, assign) CGFloat

    /** 强制引用转化弱引用 */

    __weak typeof(self) weakself = self;

    ———————SDautolayout下自定义Button

    self.StoreBtn = [UIButton new];

       [self.StoreBtn setTitle:@"" forState:UIControlStateNormal];

       [self.StoreBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];

       [self.StoreBtn setTitleColor:<#(nullable UIColor *)#> forState:UIControlStateNormal];

       self.StoreBtn.titleLabel.textAlignment = NSTextAlignmentCenter;

       self.StoreBtn.imageView.contentMode = UIViewContentModeScaleToFill;

       self.StoreBtn.titleLabel.font = [UIFont systemFontOfSize:24*kscale];

       [self.StoreBtn addTarget:self action:@selector(StoreBtn:) forControlEvents:UIControlEventTouchUpInside];

       [self.StoreBtn addTarget:self action:@selector(<#selector#>) forControlEvents:UIControlEventTouchUpInside];

       [self addSubview:self.StoreBtn];

    self.StoreBtn.sd_layout

    .widthIs(118*kscale)

    .rightSpaceToView(lineView,1)

    .topSpaceToView(self,0*kscale)

    .heightRatioToView(self,1);

    self.StoreBtn.imageView.sd_layout

    .widthRatioToView(self.StoreBtn,0.33)

    .topSpaceToView(self.StoreBtn,5)

    .centerXEqualToView(self.StoreBtn)

    .heightRatioToView(self.StoreBtn,0.33);

    self.StoreBtn.titleLabel.sd_layout

    .topSpaceToView(self.StoreBtn.imageView,10*kscale)

    .leftSpaceToView(self.StoreBtn,0)

    .rightSpaceToView(self.StoreBtn,0)

    .bottomSpaceToView(self.StoreBtn,5);——————一次想不全后续及时添加

    相关文章

      网友评论

          本文标题:常用的属性定义,方便加入代码块

          本文链接:https://www.haomeiwen.com/subject/eztyxxtx.html