Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5895] iOS 7: Setting a tableview row header incorrectly inserts a blank headerTitle

GitHub Issuen/a
TypeBug
PriorityLow
StatusResolved
ResolutionCannot Reproduce
Resolution Date2019-11-20T21:27:49.000+0000
Affected Version/sRelease 1.7.3, Release 1.7.4, Release 1.8.0, Release 3.2.0, Release 3.2.1
Fix Version/sSprint 2011-46, Release 1.8.0.1
ComponentsiOS
Labelsheader, ios7, module_tableview, qe-3.2.1, qe-testadded, reprod, row, tableview, title
ReporterKarol Pomaski
AssigneeEric Merriman
Created2011-10-28T12:09:03.000+0000
Updated2019-12-02T23:06:27.000+0000

Description

Problem

Setting a row's header property as '' now inserts a blank headerTitle. This causes a much bigger gap than usual in grouped tableviews (see attachment). Problem exists only with iOS5. On iOS4 everything works as expected and there is no extra gap.

Reproducible Steps

1. Execute the test case

Sample Code

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');

// create tab group
var tabGroup = Titanium.UI.createTabGroup();


//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});

var label1 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 1',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});

var rows = [
    {title: 'Row 1'},
    {title: 'Row 2'},
    {header: '', title: 'Row 3'},
    {title: 'Row 4'},
    {title: 'Row 1'},
    {title: 'Row 2'},
    {header: '', title: 'Row 3'},
    {title: 'Row 4'}
];

var tableview = Ti.UI.createTableView({
    style: Ti.UI.iPhone.TableViewStyle.GROUPED
});
tableview.setData(rows);

win1.add(tableview);

//
// create controls tab and root window
//
var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
    backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Tab 2',
    window:win2
});

var label2 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 2',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});

win2.add(label2);



//
//  add tabs
//
tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  


// open tab group
tabGroup.open();

Associated HelpDesk Ticket

http://appc.me/c/APP-139179

Attachments

FileDateSize
comparing.png2011-10-28T12:09:03.000+000024435
ios4.png2011-10-28T12:09:03.000+0000128386
ios5.png2011-10-28T12:09:03.000+000099060

Comments

  1. Alan Vaghti 2011-11-22

    Verified fix on an iPhone simulator running 5.0 with SDK 1.8.0.1.v20111122105459
  2. Wilson Luu 2014-01-30

    Reopening ticket. The issue is reproducible *only on iOS 7* and not a regression as this occurred with SDK 3.2.0.GA. Tested on: Appcelerator Studio, build: 3.2.1.201401281409 SDK build: 3.2.0.GA, 3.2.1.v20140128171647 CLI: 3.2.1-beta3 Alloy: 1.3.1-beta4 Xcode: 5.0.2 Devices: iphone 5s (7.0.2), ipad 2 (7.0.4)
  3. Lee Morris 2017-07-06

    It appears that this is still an issue in iOS (10.2) as 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 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131
  4. Alan Hutton 2019-11-20

    Closing. Unable to reproduce. Axway Appcelerator Studio, build: 5.1.4.201909061933  macOS : 10.14.6 Node.js Version : 8.9.1 npm Version : 5.5.1 Appcelerator CLI : 7.1.1 Titanium CLI CLI Version : 5.2.1 node-appc Version : 0.2.49 Titanium SDKs : 8.2.0.GA

JSON Source