我在 Swift 中有一堂课:
class myClass {
var theBool : Bool
init(theBool: Bool) {
self.theBool = theBool
}
init() {
self.theBool = false
}
}
在我的代码的其他地方,我有这个检查:
classist = myClass()
if let daBool = someRandomBool {
classist.theBool = daBool
}
我想知道在哪里将此支票插入班级。