iphone - Force a view change from a button when using UITabBarController -


When using UITabBarController, when the user enters certain data on the view 1 and presses a button, then calculate me something Need to do and submit the results on View2

I have an AppDelegate, View1Controller, View2Controller and View3Controller (View3 is basically static view). My AppelGate declares the UITabBarController * Root Controller;

At scene 1, I have the button counted in the IBAction pressed; However, I can not force View2 to programmatically switch.

I have done a lot for similar problems, and I think "self.rootController.selectedIndex = 1"; However, when I do this from within the button on my View1Controller, I get an error "No Structure or Union for the Root Structure" request "error."

I think I am missing something fundamental .. I need to do something with my app deliate, but I am cheating my head against the wall.

Can you provide some guidance in this situation ... Important things like ... should I refer to View1Controller header and in the context of my AppDelgate? Thanks!

How to switch from one tab to another tab, an answer has been given for it .


Comments