Skip to content
cross platform titanium nav controller and nav bar
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
NavigationBar.js
NavigationController.js
README.md

README.md

TiNavigationController

  1. Require the NavigationController class

    var NavigationController = require('NavigationController').NavigationController;
    var navController = new NavigationController();
    
  2. Add your first view to it

    var container = navController.open(myTiView);
    // container might be null, it's only used in iPhone
    
  3. Much like iPhone UINavigationControllers, it's not added to your view yet:

    Ti.UI.currentWindow.add(navController);
    

Other

If you want to be able to access the navigationcontroller from your view controllers/windows, you'll need to set them up to be initialized with the navController object like so:

    var myView = new MyView(navController);
    navController.open(myView);

You should probably keep track of the navController object so you can continue to use it.

    var MyView = function(navController) {
      this.navController = navController;
    }

Methods

Something went wrong with that request. Please try again.