I'm way in deep water here trying to get ahold of a vc.
My App layout looks like this:
TabBarController (holds a) -> UINavController for Tab 1 (holds a) -> MyOwnListViewController -> UINavController (modally) (holds a) -> ItemAddViewController -> AddItemToItemViewController
Maybe that wasn't very clear, so for clarity, when the app starts I'm on tab 1 and the MyOwnListViewController
is visible, then I push a + button in the navigation bar and I'm taken modally to the ItemAddViewController
. From there I pushViewController AddItemToItemViewController
. Now in this view controller I want to get a reference to ItemAddViewController
.
What would be the easiest way to get a reference to it?
You could modify the init*** method of your AddItemToItemViewController and pass it the reference on your ItemAddViewController.
E.G :
In AddItemToItemViewController.h :
In AddItemToItemViewController.m :
When calling your controller inside your ItemAddViewController instance :