Popover help
Hi All,
Really simple issue, but annoying. I have a window that has a rightNavButton on the navbar, that opens a Popover. When the Popover opens it adds a ScrollView within it.
The issue I have is that when I close the popover with a popover.hide()
and reopen it again by using the same click method, it re-adds the same ScrollView again so I only see half of my view. If I do it again, I can't see the first view until I scroll to the right.
Any thoughts on how I can reuse the original scroll view, and get it to either kill the scrollview when I hide the popover or hide it.
Anyone have the same issue?
Code is below (note the table is on one of the scrollviews):
var scrollView = Titanium.UI.createScrollableView({
views:[view1,view2]
});
selectNewsBtn.addEventListener('click', function()
{
var popover = Ti.UI.iPad.createPopover({
height:350,
width:350,
title: "Select News Source",
rightNavButton:addBtn
});
popover.add(scrollView);
}
table.addEventListener('click', function(e)
{
//do tablerow stuff here
popover.hide();
}
3 Answers
-
Create the popover outside the click event and show it only when you need.
-
Cheers Tamas, will give that a try
-
Sorry wrong post…