I'm using monoTouch to program an app with UITextField that show a Popover with results (like the textfield in Google Search with some recomendations). My popover will hide when a cellTable is selected. Everything seems to work normally but when I'm interact to much with it, the Popover delay almost 4 seconds to disappear. This is frustrate to users.
Here is my codes to show a Popover:
partial void showPopover (MonoTouch.Foundation.NSObject sender){
UITextField from = (UITextField)sender;
string[] tableItems = {"aaaa","bbbb"};
var tableController = new UITableViewController();
var navigationC = new UINavigationController(tableController);
tableController.Title = from.Placeholder;//dinamico
UITableView table = new UITableView(from.Frame);
tableController.View = table;
table.Source = new PopoverTableSource(tableItems);
if( popoverController == null ){
popoverController = new UIPopoverController(navigationC);
popoverController.PopoverContentSize = new SizeF (320, 320);
}
else{
popoverController.SetContentViewController(navigationC,true);
}
popoverController.PresentFromRect (from.Frame, View, UIPopoverArrowDirection.Up, true);
}
And here is the function to dismiss the Popover:
public void update(int tag, string selectedChart){
if(popoverController.PopoverVisible){
popoverController.Dismiss (true);
}
popoverController = null;
}