swift中属性的get和懒加载
2017-10-19 本文已影响18人
Just_go
var hh = screenWidth == 320 ? 200.h : 240.h
var lineV : TroubleLineView {
return TroubleLineView(frame: CGRect(0, 67+hh, screenWidth, screenHeight-67-hh))
}
lazy var time : String = self.timeV.curDate.dateString("yyyy")
lazy var hideFrame : CGRect = CGRect(0, screenHeight, screenWidth, self.aViewH)
lazy var rightView = {
return RightView(frame: CGRect(0, 0, screenWidth, screenHeight - 110))
}()