views:

23

answers:

2

Hi,

I have a component mxml in which i have a save button, on click of the save button i need to display another component which will be in a tab navigator, for this I am using the view stack. My problem is, on click of save I need to display the second tab instead of the first tab, but defaultly the first tab will be displayed.

How could this be accomplished?

Thanks!

cheers,

Deena

+5  A: 

TabNavigator and ViewStack have an attribute "selectedIndex" which you can set to 1.

Daniel Engmann
Thanks a ton mate!
Deena
Vote the answer up and select it as the correct answer if it helped you, Deena.
Typeoneerror
A: 

Have had the same issue. I set "selectedIndex" to 1 but get an error warning, "passing argument 1 of 'setView:' makes pointer from integer without a cast" Typeoneerror, please answer this problem.

speckledcarp