I'm making a UIButton subclass in Swift to perform custom drawing and animation on selection
What would be the equivalent in Swift of overriding - (void)setSelected:(BOOL)selected
in ObjC?
I tried
override var selected: Bool
so I could implement an observer but I get
Cannot override with a stored property 'selected'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…