swift中masonry的使用


let collectImage = UIImageView.init(image: UIImage.init(named: "shoucang_kong"))

collectImage.mas_makeConstraints { (make: MASConstraintMaker!) in

    make.right.mas_equalTo()(addButton.mas_left)

    make.top.mas_equalTo()(lineLabel.mas_bottom)?.offset()(5)

    make.width.equalTo()(20)

    make.height.equalTo()(20)

}

你可能感兴趣的:(swift中masonry的使用)