I have the following code
import UIKit
class CustomButton: UIButton {
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.theme_setTitleColor(GlobalPicker.customButtonTextColor, forState: .normal)
self.theme_setTitleColor(GlobalPicker.customButtonDisabledTextColor, forState: .disabled)
self.theme_backgroundColor = GlobalPicker.primaryColor
self.layer.cornerRadius = self.frame.height/4.0
self.clipsToBounds = true
}
override init(frame: CGRect) {
super.init(frame: frame)
self.layer.cornerRadius = self.frame.height/2.0
self.clipsToBounds = true
}
}
And I'm getting errors when trying to build this code with Xcode 10. The code works just fine with Xcode 9 and Swift 4.0. I was hoping for a seamless transition but apparently that's not what I'm getting.
Is this an Xcode 10 bug? Anyone else running into anything similar?
