this may sound simple, but somehow I am not able to get out of this. I have created an empty app, added two tabBar items by creating them in AppDelegate.h and AppDelegate.m files. Now for my second tabBar item, when the user clicks the second tabBar item I want to display a popOverController. I have programmatically created that, by following this link Link. Now my problem is I want to use Navigation Controller in my code where I have created my popOverController (AppDelegate.m) so that in my popOverController.m, I want to use the NavController to push other views. If someone has a simple way of achieving this, would be appreciated.
Thanks
I am little confused on where your problem is. What your trying to do is possible and should be straight forward. If your problem is that the Next view is not being pushed its because in popoverController you don’t have access to
self.navigationController. So easy solution, create a UINavigationController variable and pass navigationController to your popover or use notifications to pass what view to push back to your AppDelegate.EDIT
You can use this to listen for notifications:
Then use this to send the notifications:
The selector would be your function name (I just put a descriptive name “popOverViewControllerSelected”) and the object would need to be information on what viewController to push (i.e. 1,2,3 or @”view1″). Then you would need:
The other way I was talking about is in you popOverViewController.h add in
In you popOverViewController.m add the:
Then where ever you are adding the popOverViewController just add:
And now in your PopOverViewController you can call:
But I recommend doing the first option.