I've implemented the hidden search bar for iOS using the Titanium Alloy framework, using the searchHidden
property on a TableView.
It works well at first, the search bar is hidden... But when the user taps on a menu item and opens a new window, it causes the search bar to appear suddenly as the new window is animating into view. And then when the user goes back to the original window with the TableView (by tapping Back
), the search bar is there, when it should be hidden.
Here is my view:
<Alloy>
<NavigationWindow id="navWin">
<Window class="container">
<TableView onClick="doClick" id="theTable" searchHidden="true">
<SearchBar></SearchBar>
<TableViewRow title="Item One"></TableViewRow>
<TableViewRow title="Item Two"></TableViewRow>
<TableViewRow title="Item Three"></TableViewRow>
<TableViewRow title="Item Four"></TableViewRow>
<TableViewRow title="Item Five"></TableViewRow>
<TableViewRow title="Item Six"></TableViewRow>
<TableViewRow title="Item Seven"></TableViewRow>
<TableViewRow title="Item Eight"></TableViewRow>
<TableViewRow title="Item Nine"></TableViewRow>
</TableView>
</Window>
</NavigationWindow>
</Alloy>
And here is my controller:
function doClick() {
var win = Ti.UI.createWindow({
title: "Window",
backgroundColor: "#FFF"
});
$.navWin.openWindow(win, {animated: true});
};
$.navWin.open();