I want to use the same view either by tapping a tab on the tab bar, or if the view is navigated to from a different area of the program.
My problem is, if I use the tab bar navigation, I don't have the navigation controller on top of the view. If I navigate to the view from a different section of the program, then it does have a navigation controller and everything works.
Is there a way to programmatically generate a navigation bar when I tap the Tab Bar Item.
I tried subclassing UITabBarController, then setting self.tabbar.delegate = self; in viewDidLoad, but this causes an insta-crash.
I haven't run into issues before setting self as a delegate so I don't know why it is happening with the tab bar?
Alternatively, is there a way to add the navigation controller when the viewController is instantiated if it can determine it is not part of a navigation controller?
I am using Storyboards if that makes any difference.
My problem is, if I use the tab bar navigation, I don't have the navigation controller on top of the view. If I navigate to the view from a different section of the program, then it does have a navigation controller and everything works.
Is there a way to programmatically generate a navigation bar when I tap the Tab Bar Item.
I tried subclassing UITabBarController, then setting self.tabbar.delegate = self; in viewDidLoad, but this causes an insta-crash.
I haven't run into issues before setting self as a delegate so I don't know why it is happening with the tab bar?
Alternatively, is there a way to add the navigation controller when the viewController is instantiated if it can determine it is not part of a navigation controller?
I am using Storyboards if that makes any difference.
Last edited: