oc调用swift, 访问Bool属性isRegist时:
@objc var isRegist: Bool?
报错: Property cannot be marked @objc because its type cannot be represented in Objective-C
@objc var isRegist:Bool = false { //此处一定要给初始值
willSet{
}
didSet{
//处理逻辑
}
}
或
@objc var isRegist:Bool = false
网友评论