Main…
I have many cases where my main menu is not the root controller… In the
case of this update, my Main controller is after a load screen which
makes the app load faster in the long run…
Specific controller…
I also needed to just hide a menu on a specific screen and show another
view from there. Thus I added this for a bit of comfort in the whole
process…
The index of the main controller is currently set to 1, if your main controller is not 0(which popToRoot will also work for) or 1(current main setup), the index can just be changed to any index you need...
Main… I have many cases where my main menu is not the root controller… In the case of this update, my Main controller is after a load screen which makes the app load faster in the long run…
Specific controller… I also needed to just hide a menu on a specific screen and show another view from there. Thus I added this for a bit of comfort in the whole process…