Property cannot be marked @objc because its type cannot be represented in Objective-C

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 

你可能感兴趣的:(Property cannot be marked @objc because its type cannot be represented in Objective-C)