Titanium Community Questions & Answer Archive

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

Hiding nav buttons on Popover

Hi all,

Bit stuck. I have an iPad Popover, that has a rightNavButton. I have a ScrollableView in the Popover, when the right nav button is clicked it slides to the second view. What I want when I click the right nav button, is for it to hide (and eventually show a back button in the left nav button, but I'll sort that bit later).

Here's what I have:

var popover = Ti.UI.iPad.createPopover({
    height:350,
    width:350,
    title: "Select",
    rightNavButton:addBtn,
    leftNavButton:backBtn
});    

popover.add(scrollView);
popover.show({view:selectBtn});

addBtn.addEventListener('click', function()
{
    scrollView.scrollToView(view2);
    //hide nav button goes here

});

I've tried the following:

popover.setRightNavButton(null);

and

popver.rightNavButton = null;

None of them work, I get a 'NSInvalidArgumentException', reason: '* -[NSNull barButtonItem]: unrecognized selector sent to instance 0x39ccde0'

Any thoughts

Hope you can help
Paul

— asked July 27th 2010 by Paul Pounder
  • button
  • nav
  • popover
0 Comments

6 Answers

  • duplicate

    — answered July 29th 2010 by Dan Tamas
    permalink
    0 Comments
  • addBtn.hide();
    
    — answered July 29th 2010 by Dan Tamas
    permalink
    0 Comments
  • Hi Tamas,

    I've tried that and it doesn't seem to work either, maybe a bug?

    Paul

    — answered July 29th 2010 by Paul Pounder
    permalink
    0 Comments
  • maybe this?

    addBtn.addEventListener('click', function(e)
    {
        scrollView.scrollToView(view2);
    
    e.source.hide();
    //hide nav button goes here
    
    });
    
    — answered July 29th 2010 by Dan Tamas
    permalink
    0 Comments
  • Will give it a try tomorrow, many thanks.

    — answered July 29th 2010 by Paul Pounder
    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.