Present a viewcontroller inside a navigationcontroller from another tab in tabbed application

StackOverflow https://stackoverflow.com/questions/16142520

  •  11-04-2022
  •  | 
  •  

Question

I have a tabbed application and each tab has a navigation controller with table views in it.

In one of the view from a tab, I want to present the first view controller of another tab.

My tabViewController.viewControllers has an array of navigation controllers for each tab.

I cant seem to present the view controller directly without accessing the navigation controller and I guess you cant present a navigation controller. What am I doing wrong??

Was it helpful?

Solution

If I understood you correctly, you can access to your root controller something like that: [[tabViewController.viewControllers objectAtIndex:index] objectAtIndex:0], but I dont think you can display one view twice. So you still should recreate this view controller to display it in another tab as childViewController, for example

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top