以下是否有区别:
原文链接:https://www.f2er.com/swift/319497.html懒变量:
lazy var profileImageIsLoaded : Bool = { return (profileImageView.image != nil) && (profileImageProgressView.alpha == 0.0) }()
功能:
func profileImageIsLoaded() -> Bool { return (profileImageView.image != nil) && (profileImageProgressView.alpha == 0.0) }
计算物业:
var profileImageIsLoaded : Bool { return (profileImageView.image != nil) && (profileImageProgressView.alpha == 0.0) }
什么方法最好用?