1

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?

Sergei
  • 13
  • 2

1 Answers1

1

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()
Weptun
  • 158
  • 4
  • Thanks for a quick reply! It worked for me! The only left question is how to add 'back' button to navbar and to connect it with a main screen, which is parent of Tabcontroller screen? – Sergei Jun 14 '13 at 11:22
  • Where should I put this code? I can't find an action, which would be triggered when I press "back" button on navbar in Tab1_content. onGoBack action doesn't seem to work for me. – Sergei Jun 14 '13 at 11:57
  • There is no such action. As you are in a modal view, and a modal view opens a new navigation hierarchy, you can't go back. Just add a Barbutton on the left side with the dismiss action. The button won't be visible on android – Weptun Jun 14 '13 at 12:11