First, I don't know why the SDK makes 'init?(coder:)' required — presumably there's a good reason, which means you just have to live with it.Second, you shouldn't need to implement either 'init' in BaseViewController, if all you're doing is calling super. According to the Swift rules, if BaseViewController doesn't declare any designated initializers, it inherits all of them from its superclass (UIViewController).Third, by the same rule, your custom 'init' in PlayerViewController prevents inheritance of designated controllers from its ancestor classes. This is what you want for 'init(nibName:bundle)', because you don't want that to be available for PlayerViewController. It's also what you apparently want for 'init?(coder:)', but unfortunately there's that 'required' … um … requirement. See above under live with it. Think of it as a legacy from the bad old Objective-C days.
Topic:
Programming Languages
SubTopic:
Swift
Tags: