Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8571485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:47:30+00:00 2026-06-11T18:47:30+00:00

Hi Im new to titanium which allow developer to create cross platform apps. I

  • 0

Hi Im new to titanium which allow developer to create cross platform apps. I need to create a navigation group that works with both android and iOS. is there any clear solution ( as Ti.UI.iPhone.createNavigationGrou() only works on iphone,

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:47:32+00:00Added an answer on June 11, 2026 at 6:47 pm

    I have the following NavigationController that lives in the android and iphone folders:

    android

    var NavigationController = function() {
        var self = this;
    
        self.open = function(windowToOpen) {
            //make "heavyweight" and associate with an Android activity
            windowToOpen.navBarHidden = windowToOpen.navBarHidden || false;
    
            if(!self.rootWindow) {
                windowToOpen.exitOnClose = true;
                self.rootWindow = windowToOpen;
            }
    
            windowToOpen.open();
        };
    
        self.close = function(windowToClose) {
            windowToClose.close();
        };
    
        return self;
    };
    
    module.exports = NavigationController;
    

    iphone

    var NavigationController = function() {
        var self = this;
    
        function createNavGroup(windowToOpen) {
            self.navGroup = Ti.UI.iPhone.createNavigationGroup({
                window : windowToOpen
            });
            var containerWindow = Ti.UI.createWindow();
            containerWindow.add(self.navGroup);
            containerWindow.open();
        };
    
        self.open = function(windowToOpen) {
            if(!self.navGroup) {
                createNavGroup(windowToOpen);
            }
            else {
                self.navGroup.open(windowToOpen);
            }
        };
    
        self.close = function(windowToClose) {
            if(self.navGroup) {
                self.navGroup.close(windowToClose);
            }
        };
    
        return self;
    };
    
    module.exports = NavigationController;
    

    Then, you can just use it (you will automatically get the correct one based on your runtime):

    var NavigationController = require('NavigationController')
    var MyView = require("ui/MyView");
    
    var controller = new NavigationController();
    var myView = new MyView(controller);
    controller.open(myView);
    

    You can continue opening windows and they go on the stack. Notice I passed the controller into the first view. You keep doing that:

    controller.open(new SecondView(controller));
    

    The back button will automatically push things off your stack. If you need to do it programatically, just tell the controller to close it:

    controller.close(myView);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am new App Developer with Titanium. i want to create a window base
i am very New to Android apps in titanium i create the one sample
I've been testing the new ForgedUI add-on for Titanium that helps create UI elements
I am New Developer for Titanium. I had install Titanium Package for iPhone it
I am Application Developer with the Titanium. i want to develop new Application with
I am new to the technology which is being used in the appaccelator titanium
I am new in android and working on titanium platform but not getting how
I have a new project which is an iPhone application. for that I have
I'm new to Titanium Studio. I would like to create a Textfield without border
New developer here,Im using the Custom Image Picker by ray wenderlich. But what I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.