Search code examples
navigationtabbarnavigationbarappconkit

Tabbed screen with custom navigation in AppConKit 3


How to create a screen with multiple subscreens as tabs with a custom navigation bar using AppConKit 3?

In an app I want to have one screen with tab navigation. It's not a top screen. This screen should have a custom navigationBar. How can I do it using AppConKit?


Solution

  • it's generally not supported to have tabbars as NOT firstscreens in a navigation hierachy - especially on iOS this can cause serious issues on pre iOS 6 devices. If you want to show a tabbar as not the first screen in your app, show it modally (just add a true) to the showView. Second, if you have navigation inside your tabs, you will want a separate navigation controller in each tab. So the layout for an app with two tabs you will have is :

    • Screen with type Tabcontroller, containing:
      • Tab1 pointing to Tab1_Nav
      • Tab2 pointing to Tab2_Nav
    • Screen Tab1_Nav type Navigation, Rootform set to Tab1_content
    • Screen Tab2_Nav type Navigation, Rootform set to Tab2_content
    • Screen Tab1_content type normal with a custom navbar and a bar button item.
    • Screen Tab2_content

    Hope this helps

    [Edit]: in a modal navigation structure you can close the whole modal screen with the function dismissModal.

    mobileController.activeController().dismissModal()