swift 懒加载
2019-01-02 本文已影响0人
江河_ios
lazy var imageView:UIImageView= {
letimageView =UIImageView()
imageView.layer.masksToBounds=true
imageView.image=UIImage(named:"bg") imageView.layer.cornerRadius=KScreenNewValueWidth(Value:80) returnimageView
}()
lazy var nameLable:UILabel= {
letnameLable =UILabel()
nameLable.text="比对不一致"
nameLable.textAlignment=NSTextAlignment.center
nameLable.font=UIFont.systemFont(ofSize:14)
returnnameLable
}()