美文网首页
swift中属性的get和懒加载

swift中属性的get和懒加载

作者: Just_go | 来源:发表于2017-10-19 13:56 被阅读18次
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))
    }()

相关文章

网友评论

      本文标题:swift中属性的get和懒加载

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