I am trying to create a couple of views that change a little according to orientation.
In landscape, I want a split view - .master has one view (vList), whilst .detail is a tabBar.
In portrait, I want a simple tab view - where vList (from above) is the first tab.
I can do this reasonably well in an IDE build screen - but this doesn’t allow me to access all the views.
I can do this for an programmatically generated screen, but only with a single instance of all the views, tabbars and splits.
If I want to have multiple versions it all comes crashing down.
So now I want to do the same programmatically but I end up with blank views, missing tabs, crashes etc.
I’ve tried some different methods, variously saving instances of the iosViews, iosTabBars, iosScreens and iosScreenContents to be able to apply via app.currentscreen.content = abc.content but none seem to be reliable.
I’m not sure if I am dealing with bugs in the system or bugs in my programming - debugging in iOS is hard.
Some principle questions:
- Can an iosView instance appear in more than one iosTabBar or iosSplit?
- When applying a new iosScreenContent - what happens to the view that you are currently sitting on? For example, if I have the same iosView in both screens, does it stay sitting on the same view or is a new one activated?
- Can instances of iosTabBars, screens and views be saved (eg in arrays) and brought back for re-use. Are there some limitations here?
I have been assuming that I should keep multiple views (screens, tabs etc) in play to be able to navigate around the app. Would I be better off just making a single instance of all the views and re-apply the data each time? How would this then work in a multi-view device like the iPadPro?
Has anyone had better success than me in this area?