So far, we've been ignoring the concept of a view stack, even though we have already dealt with it implicitly. Remember back in Project 3, Mobile Application Design, when we assigned z-index
to each view? This was to ensure they always stacked in the proper order when on screen.
Thankfully, most UI frameworks eliminate this tedium, and YASMF is no different. It provides a simple solution to having hardcoded z-index for our views.
The view stack (or view hierarchy) is simply a representation of the visible and hidden views active in the DOM. So far, we've only had to deal with one view being on top of another, but in complex apps, you can imagine that it would be possible to have several views on the stack. In order to handle them all, it is better to manage them programmatically rather than manually.
Something else you've no doubt noticed is that our app doesn't have any animation between views. Typically, mobile apps perform some animation between...