[TIMOB-11176] iOS: TableView - Postlayout table event fired 3 times
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-26T08:34:39.000+0000 |
Affected Version/s | Release 2.1.3 |
Fix Version/s | Release 3.0.2 |
Components | iOS |
Labels | parity, qe-ios090112 |
Reporter | Tamila Smolich |
Assignee | Shameer Jan |
Created | 2012-09-26T21:21:38.000+0000 |
Updated | 2017-03-21T21:58:35.000+0000 |
Description
Description:
Postlayout table event fired 3 times on iOS and alert appears 3 times as well.
This is not a regression, occurs on 2.1.2.
Steps:
1. Run the following code and check the console:
var win = Ti.UI.createWindow({
backgroundColor:'white',
title:'test',
modal:true
});
var data1 = [];
var tvr = Ti.UI.createTableViewRow({
title:'pippo',
hasChild:true
});
data1.push(tvr);
var table = Ti.UI.createTableView({
top: 10,
left: 10,
width: 200,
height: 200,
scrollable: false,
borderRadius: 10,
backgroundColor: 'white',
data : data1
});
table.addEventListener('postlayout', function() {
setTimeout(function(){
Ti.API.info('#### postlayout table event received.');
alert('postlayout table event fired');
},600);
});
win.add(table);
win.open();
Expected result:
Postlayout table event should be fired only once, also should see one alert "postlayout table event fired"
Actual result:
Postlayout table event fired 3 times, and alert appears 3 times as well.
Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
Closing ticket as the issue cannot be reproduced and due to the above comments.