Titanium Community Questions & Answer Archive

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

iPad Popover in NavBar Button

My iPad app will have a couple of menu options at the top that all call separate popovers. I'm having trouble positioning the first one in the left navigation.

barLeft.addEventListener('click', function() {
    var close2 = Ti.UI.createButton({
        title:'Close'
    });

    close2.addEventListener('click', function() {
        popover2.hide({animated:true});
    });

    var popover2 = Ti.UI.iPad.createPopover({ 
        width:400, 
        height:250,
        rightNavButton:close2,
        barColor:'#313436',
        arrowDirection:Ti.UI.iPad.POPOVER_ARROW_DIRECTION_UP
    }); 


    popover2.show({
        view:barLeft,
        rect:{x:0,y:0,width:0,height:0},
        animated:true

    }); 
}); // end build popover on barLeft Click

Ends up looking like this:
http://rileyhamilton.com/z/nash/pop.png

I think it has to do with the RECT property, but changing those values as well as the VIEW property don't give me the results I'd like.

I'd like the arrow to come up right under the nav button.

Thanks for any help!

— asked August 9th 2010 by Riley Hamilton
  • ipad
  • popover
0 Comments

1 Answer

  • if you remove the rect property and leave only

    view:the_button_you_want_under
    

    does not work?

    — answered August 9th 2010 by Dan Tamas
    permalink
    2 Comments
    • nope, same result :-(. maybe it's because it's a navbar and not a button. going to keep trying.

      thanks though

      — commented August 9th 2010 by Riley Hamilton
    • did you ever get this to work? i'm having the same issue, the "rect" property doesn't seem to do anything

      — commented January 18th 2011 by Kevin Southworth
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.