How can I subclass UISegmentedControl having custom designated initializer?
How can I subclass UISegmentedControl having custom designated initializer? Seems like a trivial issue but I am not able to make this compile. Neither in playgrounds nor in normal swift ios projects. (Please note I am not using Storyboards that's why I don't need / care about the init?(coder) part..it;s jsut it has to be include otherwise the complier complains about it.) class SegmentedControl: UISegmentedControl { let configuration: [String] required init(configuration: [String]) { self.configuration = configuration super.init(items: configuration) } required init?(coder aDecoder: NSCoder) { fatalError() } } let x = SegmentedControl(configuration: ["a","b"]) It is complaining about not having the deisignated initializer implemented. Fatal error: Use of unimplemented initializer 'init(frame:)' for class '__lldb_expr_167.SegmentedControl' I don't understand what is going on here. Isn...