I’ve encountered problem after problem while developing my app today (most of them I fixed), and I started looking at some navigation examples to improve the navigation in my app. I stumbled upon tab bar navigation (https://www.fusetools.com/examples/tab-bar-navigation), which looked like something I could need.
I then proceeded to copy the code provided to my project and started messing around with it. However, after struggling for about an hour or so, I still can’t, for the love of me, figure out how I’m supposed to use multiple, different pages with the code provided?
As the pages are iterated using a loop, I’ve no clue as to how to use different pages, any help would be appreciated, as I’m starting to get frustrated.
a frustrated Kodemikkel is definitely not something that we want to see, so let’s get cracking!
The only thing that appears to be a question is the how to use different pages part, but honestly I don’t really understand what the question is. The basic structure of the example is there, the pages are defined in JavaScript and you seem to be good to go… so where’s the problem exactly?
It might be that I’m misunderstanding or missing something basic here, but in the example every page is equal. All pages have the same content, apart from the color and icon. How would I go about creating pages with different content? Let’s say I want a page with a button and a different page with some text.
I see that all pages are created using MyPage class, but would it be possible to define the pages using one class for each page, or is the difference in content limited to what you define in the JavaScript array?