我有一个UIView子类,我试图覆盖子类中的userInteractionEnabled
属性。我的代码如下:
override var userInteractionEnabled:Bool {
didSet {
if !userInteractionEnabled {
topLeftPoint.hidden = true
bottomLeftPoint.hidden = true
bottomRightPoint.hidden = true
topRightPoint.hidden = true
}
super.userInteractionEnabled = userInteractionEnabled
}
}
我收到编译错误:
'预期'get','set','willSet'或'didSet'关键字来启动 访问者定义'
我做错了什么?