Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6871] iOS: UI - tableView searchBar obscured by window title after rotating modal window to landscape

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-12-11T19:19:07.000+0000
Affected Version/sRelease 1.7.5, Release 1.8.0.1
Fix Version/s2012 Sprint 25, 2012 Sprint 25 Core
ComponentsiOS
Labelsn/a
ReporterSindre Sorhus
AssigneeIngo Muschenetz
Created2011-11-23T06:44:54.000+0000
Updated2014-06-19T12:42:58.000+0000

Description

Problem

When using a tableView with a searchBar in a modal window, the searchBar is obscured by the window title when the device is rotated to landscape. If the tableView is dragged down, the searchBar comes into view, but then springs back under the window title when released. Also the first index, "0", is also obscured. Note: this problems do not occur for non-modal windows.

Test case

Ti.UI.setBackgroundColor('#000');

var win1 = Ti.UI.createWindow({  
    title: 'win1',
    backgroundColor: '#f00'
});

win1.open()

var win2 = Ti.UI.createWindow({  
    title: 'win2',
    backgroundColor: '#0f0'
});

var searchBar = Ti.UI.createSearchBar();

var tableData = [];
var header = '';
var index = [];
for ( var i = 0; i <= 20; i++ ) {
	var row = Ti.UI.createTableViewRow({
		title: 'test'
	});
	index.push({
		title: i+'',
		index: i
	});
	tableData.push(row);
}

var table = Ti.UI.createTableView({
	search:searchBar,
	data:tableData,
	index:index
});

win2.add(table);

win2.modal = true; //toggle this to introduce problem
win2.open();

Attachments

FileDateSize
landscape.png2011-11-23T06:44:54.000+0000171744
portrait.png2011-11-23T06:44:54.000+0000184436

Comments

  1. Paul Dowsett 2011-12-26

    Sindre Thank you for raising this - I have reproduced the issue on my system. Please note the changes I have made, particularly in reducing the code to its bare minimum. I will escalate this to the main project now. Cheers
  2. Max Stepanov 2012-12-11

    Cannot reproduce with 3.0.0 build on iPad simulators (all versions)
  3. Shyam Bhadauria 2013-01-15

    Environment used for verification - Titanium SDK: 3.0.0.GA Titanium SDK: 3.1.0.v20130108153753 Titanium  Studio: 3.0.1.201212181159 Since the search bar width get shortened of. There is separate bug for that(TIMOB-10585).

JSON Source