viewstack vs. tab navigator
I'm new to flex and was looking at som开发者_如何学Goe of the components that ship with flex.
Can someone tell me the difference between viewstack and tab navigator. They seem to be somewhat similar.
When do you use one or the other?
Both are navigator containers.
The difference is tabnavigator displays tabs (one for each of its child) in order to control which child should be displayed.
Viewstack doesn't have a UI which means you change the selected child with actionscript code.
Also, you can use a tabnavigator, a togglebuttonbar or other UI navigators as controllers for your viewstack by setting the navigator dataProvider property to the id of your viewstack.
both are same , but in viewStack at a time any only one item can be selected in run time,while all are in a quee(not seems),
where as with tabNavigator all items are visible ,depending upon requirement we can select any one tab at a instance
Note : to show all options visible tab navigator is usefull, to show only one among all items go for tab navigator
TabNavigator extends ViewStack and supplys some default UI to navigate to children of the TabNavigator.
- Use TabNavigator when all you need is standard navigation (like main menu's on web sites).
- Use ViewStack when you need custom navigation, like vertical lists, or when you dont need navigation (you might have a view stack with a login box and switch the view on login event)
精彩评论