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
6 Answers
-
duplicate
-
addBtn.hide();
-
Hi Tamas,
I've tried that and it doesn't seem to work either, maybe a bug?
Paul
-
maybe this?
addBtn.addEventListener('click', function(e) { scrollView.scrollToView(view2); e.source.hide(); //hide nav button goes here });
-
Found a workaround. Check here: Hiding buttons on a popover
-
Will give it a try tomorrow, many thanks.