[TIMOB-9064] iOS: tableview with search in popover in landscape mode gives different results in iOS 4.x and iOS 5.x
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Won't Do |
Resolution Date | 2020-01-10T18:07:35.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | n/a |
Components | iOS |
Labels | api |
Reporter | Nikhil Sharma |
Assignee | Abir Mukherjee |
Created | 2012-05-08T17:15:05.000+0000 |
Updated | 2020-01-10T18:07:35.000+0000 |
Description
Tableview with search in popover in landscape mode gives different results in iOS 4.x and iOS 5.x
Repo Steps
1. Run the code below in app.js 2. Click the button. 3. Pull down to reveal search. 4. Focus on the search. 5. Rotate to landscape. 6. On iOS 5.x since the popover resized so you can search and on iOS 4.x it resizes back to original so you can never search.
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
createTableRow = function(args){
// save the title for our own use
var title = args.title;
args.title = '';
args.left = 42;
args.height = 40;
var row = Ti.UI.createTableViewRow(args);
var label = Ti.UI.createLabel({
backgroundColor: 'pink',
text: title,
textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,
width: Ti.UI.FILL,
height: args.height - 5,
left: args.left,
font: { fontSize: 17, fontWeight: 'bold'},
});
row.add(label);
row.label_title = title;
return row;
};
var rows = [];
rows.push( createTableRow({ title: 'table', leftImage: '/KS_nav_ui.png'}) );
rows.push( createTableRow({ title: 'row', leftImage: '/KS_nav_ui.png'}) );
rows.push( createTableRow({ title: 'rock' }) );
rows.push( createTableRow({ title: 'car', leftImage: '/KS_nav_ui.png'}) );
rows.push( createTableRow({ title: 'tab' }) );
rows.push( createTableRow({ title: 'row boat', leftImage: '/KS_nav_ui.png'}) );
rows.push( createTableRow({ title: 'table row', leftImage: '/KS_nav_ui.png'}) );
rows.push( createTableRow({ title: 'test', leftImage: '/KS_nav_ui.png'}) );
rows.push( createTableRow({ title: 'apple' }) );
var search = Ti.UI.createSearchBar({
showCancel: false
});
var table = Ti.UI.createTableView({
data: rows,
search: search,
searchHidden: true,
filterAttribute: 'label_title',
filterCaseInsensitive: true
});
var collectionPopoverView = Ti.UI.iPad.createPopover({
barColor:'#ffffff',
navBarHidden: true,
width: 390,
height: 420
});
var buttonView = Ti.UI.createButton({
title: 'test test',
top: 20,
left: 20
});
buttonView.addEventListener('click', function(){
collectionPopoverView.show({
view: buttonView
});
});
win.add(buttonView);
collectionPopoverView.add(table);
win.open();
This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. If community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.