problem
In a Ti.UI.TableView on iOS, you cannot use the *search* property's Ti.UI.SearchBar if you have also specified as *headerView*. You won't encounter any errors, you will just not get the SearchBar in your app. You will only see the headerView.
If this is the expected behavior, I did not see it documented with respect to the Ti.UI.SearchBar in the API docs.
expected behavior
The SearchBar would be anchored at the top of the table with the headerView under it.
test case
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var data = [];
for (var i = 0; i < 25; i++) {
data.push({title:'row '+(i+1)});
}
var table = Ti.UI.createTableView({
search: Ti.UI.createSearchBar(),
headerView: Ti.UI.createView({
backgroundColor: '#a00',
height: 50
}),
data: data
});
win.add(table);
win.open();
Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) iOS iPhone Simulator: iOS SDK version: 6.0 jithinpv
For reference, I've attached 2 screenshots. One shows the ListView behaving as expected. The other shows an equivalent TableView not showing the SearchBar, despite having specified it along with the headerView.
I am able to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170609091155 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131