I have these custom classes :
1.
class MyNavigationController: UINavigationController {
}
2.
class HomeNavigationController: MyNavigationController {
init() {
super.init(rootViewController: HomeViewController())
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
}
3.
class MyViewController: UIViewController {
}
4.
class HomeViewController: MyViewController {
init() {
super.init(nibName: "HomeViewController", bundle: .main)
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
}
Then I try to initialize an instance of HomeNavigationController
in app delegate :
let homeVC = HomeNavigationController()
But when doing so, I get this error:
fatal error: use of unimplemented initializer 'init(nibName:bundle:)' for class 'HomeNavigationController'
I don't see why it's trying to call it... so what to do?