I'm creating a custom navigation controller. I have something like this:
public class CustomNavigationController: UINavigationController {
// MARK: - Life Cycle
override init(rootViewController: UIViewController) {
super.init(rootViewController: rootViewController)
delegate = self
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
delegate = self
}
}
I wanted to test this out so I created a CustomNavigationController like this:
CustomNavigationController(rootViewController: ViewController())
When I run the app I get this:
fatal error: use of unimplemented initializer 'init(nibName:bundle:)' for class 'TestApp.CustomNavigationController'
I don't see the problem, can anyone help me out?
question from:
https://stackoverflow.com/questions/38334776/fatal-error-use-of-unimplemented-initializer-in-custom-navigationcontroller 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…