I have downloaded Xcode 10 beta2 and rebuild my project, codes such as:
let someView = UIView()
come up with the following error:
Cannot invoke initializer for type 'UIView' with no arguments
Pretty strange. Has anybody encountered those building errors when using Xcode 10 beta2?
For me it was reasoned by extending NSObjectProtocol:
extension NSObjectProtocol where Self: UIView
I fixed it by replacing NSObjectProtocol to any other protocol that UIView conforms. In my case it was UIAppearance:
extension UIAppearance where Self: UIView
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With