Consider the following.
fileprivate extension UIButton {
override open var isSelected: Bool {
didSet {
self.titleLabel?.font = isSelected ? UIFont(name: "HelveticaNeue-Medium", size: 14) : UIFont(name: "HelveticaNeue-Light", size: 14)
}
}
}
After a while, a warning appears in xcode that asks me to change "open" to fileprivate. Of course if I do that, then I'm not overriding the same isSelected
variable from UIButton and I get an error.
Is this an XCode bug? I cannot make the extension public or internal as the behaviour will alter all UIButtons
in the app.
Any ideas?
Update: