Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Possible to have navigation group in popover?

Right now i've got a regular window with a navigation group opening inside a popover but it just doesn't look very good and was wondering if it was possible to put that nav group functionality up in the popover navbar…basically, i need the back button tracking for opening and closing windows in the popover.

Thx!

— asked September 29th 2010 by Kelly Redd
  • group
  • ipad
  • navigation
  • popover
1 Comment
  • Any news on this? I need to add this to my app as well.

    — commented November 20th 2010 by Antonio Silveira

4 Answers

  • Yes , it is possible.
    You create the navigation group, add the necessary window and views or table views to it.
    Create the popover, and set navBarHidden=true

    //put code below as a callback in an event listener for object  button
    var win= Ti.UI.createWindow();
    var nav=Ti.UI.Iphone.createCreateNavigationGroup({
           window:win
            }
    var popover=Ti.UI.iPad.createPopover({ 
                width:200, 
                height:200,
                title:title,
                arrowDirection:Ti.UI.iPad.POPOVER_ARROW_DIRECTION_TOP
            }); 
    popover.navBarHidden=true;
    popover.add(nav);
    popover.show({
                view:button,
                animated:true
            });
    
    — answered May 22nd 2011 by Richard Lustemberg
    permalink
    1 Comment
    • There are some typos in the above example. Here is a complete event handler with navigation bar in the popover.

      function showPopoverWithNavbar(e) {
      
          var win= Ti.UI.createWindow();
          var nav=Ti.UI.iPhone.createNavigationGroup({
                 window: win
                });
      
          var popover=Ti.UI.iPad.createPopover({ 
                      width:200, 
                      height:200,
                      title: ' title ',
                      arrowDirection:Ti.UI.iPad.POPOVER_ARROW_DIRECTION_TOP
                  }); 
          popover.navBarHidden=true;
          popover.add(nav);
          popover.show({
                      view: e.source,
                      animated:true
                  });
      
          var win3 = Titanium.UI.createWindow({
              backgroundColor: 'blue',
              title: 'Blue Window'
          });
          nav.open(win3, {animated:true});
      }
      

      — commented August 1st 2012 by Jay Namboor
  • Still nothing on this?

    — answered November 28th 2010 by Bill Labus
    permalink
    0 Comments
  • This doesn't quite work as the title and buttons appear in the containing window's navbar rather than the pop-overs navbar

    — answered June 27th 2012 by Neville Dastur
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.