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 buttons on a popover

I've asked this recently but had no answers. I'm trying to hide a rightNavButton on a Popover, but having no luck.

I believe this has been answered here

By setting it to null, but could someone actually advise how its done as I've tried popover.setRightNavButton(null) and button.rightNavButton = null and button.rightNavButton = 'null' but no luck.

Any help would be gratefully appreciated as always


— asked July 29th 2010 by Paul Pounder
  • button
  • hide
  • popover

1 Answer

  • In my experience, setting the popovers NavButtons to null causes the app to crash. This has to be a bug, given that the same method works just fine with the NavButtons on a window. I have, however, found a workaround (after a frustrating hour of poking around and searching in vain for answers). Try this:

    popover.leftNavButton = Ti.UI.createView({ width: 0, height: 0 });

    The zero width and height are needed to avoid compiler warnings.

    — answered October 26th 2011 by Mark Pemburn
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.