I have a custom navigationBar:
class Name_UINavigationBar: UINavigationBar {
}
and I want to programmatically configure it on a navigation controller. So I tried:
var navController : UINavigationController = UINavigationController(
navigationBarClass: object_getClass(Name_UINavigationBar),
toolbarClass: nil)
But he collapsed, saying:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'MyProject.Name_UINavigationBar is not a subclass of UINavigationBar'
source
share