currentStateChange and enterState don't work with a TabNavigator They are indeed in the docs, but they don't seem to work.
creationComplete and initialize only happen once. With states you can easily init a state with the enterState event. I want something similar for the TabNavigator. Now I listen for the Change event of the TabNavigator and keep the prevIndex in a variable. And depending on the index I initialize the TabView. Is that a best practice? regards Vic 2009/1/5 Manish Jethani <manish.jeth...@gmail.com> > On Mon, Jan 5, 2009 at 2:22 PM, endrone endrone > <endr...@gmail.com<endrone%40gmail.com>> > wrote: > > > when you change a state, there's a enterState dispatched when a new state > is > > shown. > > This is very handy for initializing the state. > > > > But does something similar exist for the tabNavigator? (enterState exists > > for a TabNavigator but doesn't work) > > What if you have several tabs and you want to initialize your tab view > when > > changing? > > What are best practices? > > There are some state-related events: currentStateChanging, > currentStateChange, enterState. Check the docs. There's also a change > event dispatched by the TabNavigator, and then there's the initialize > and creationComplete events dispatched by the individual child > containers. > > Manish > > -- > http://manishjethani.com/ > >