Reputation: 1
I am working on a cocoa touch framework. In my framework I have a view contoller and a tab bar controller with different tabs. I am integrating framework in another iOS project.
Now that iOS project has a navigation controller with a splash screen and another navigation controller with a login screen. So the view hierarchy is like this:
Navigation Controller -> Splash Screen -> Navigation Controller -> Login Screen
In the project, when Login Controller is pushed the rootview controller becomes the navigation controller of Login Screen
let hkWindow = UIApplication.shared.delegate as! AppDelegate
hkWindow.window!.rootViewController = self.navigationController
Now the problem is when I comment the code above in Login Screen, my navigation titles inside tab bar controllers work absolutely fine but with the above code my navigation item shows nothing, not even a back button on push view controllers.
When I coment the code my navigation bar shows absolutely perfect
When I uncomment the code, my navigation bar becomes blank
Please help guys!
Upvotes: 0
Views: 145
Reputation: 458
you can set title view manually, set in the tab bar controller
if let tabController = self.parent as? UITabBarController {
tabController.navigationItem.title = "Transaction history"
}
Upvotes: 0