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
http://developer.appcelerator.com/question/2841/hide–remove-winrightnavbar-button
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
Paul
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.