Hi,
I tried to create a subclass of UIStackView, but I get a strange error related to `init`. My views are created in code, not in IB, so I wrote a basic `init()` that calls up to the designated initalizer. Like this:
class MyView : UIStackView {
[ Some `let` instance variables ]
init() {
[ set the instance vars ]
let arranged = ...
super.init(arrangedSubviews: arranged) // the designated initializer
...
}
required init?(coder aDecoder: NSCoder) { fatalError("not impl") } // xcode requires this one
}
At runtime I get this error:
fatal error: use of unimplemented initializer 'init(frame:)' for class 'MyProject.MyView'.
Stack:
MyView.init(frame:)
UIStackView.init(arrangedSubviews:)
MyView.init()
That looks to me like something is wrong with the library or the language. Am I right? Or missing something?
Rob