[TIMOB-27935] iOS: TableViewRow does not return getRect methods
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-11-20T15:09:21.000+0000 |
Affected Version/s | Release 9.0.2, Release 9.1.0 |
Fix Version/s | Release 9.3.0 |
Components | iOS |
Labels | n/a |
Reporter | Samir Mohammed |
Assignee | Gary Mathews |
Created | 2020-06-04T13:23:58.000+0000 |
Updated | 2020-11-20T15:09:21.000+0000 |
Description
When trying to get the Click on the
rect.height
the value does not change even through the tableViewRow height is increasing/changing. On the Android side this is working fine and the value is returned.
*Test Case:*
win = Ti.UI.createWindow({
backgroundColor: '#AAAAFF',
layout: 'vertical'
});
var top = Ti.UI.createView({
backgroundColor: '#FFAAAA',
layout: 'horizontal',
height: Ti.UI.SIZE,
width: Ti.UI.FILL
});
var btnPlus = Ti.UI.createButton({title: '+', top: 50, color: 'white', borderWidth:2 });
btnPlus.addEventListener('click', function() {
console.log('plus click');
view.height += 50;
});
var btnMinus = Ti.UI.createButton({title: '-', top: 50, color: 'white', borderWidth:2 });
btnMinus.addEventListener('click', function() {
console.log('minus click');
view.height -= 50;
});
var label = Ti.UI.createLabel();
var tableView = Ti.UI.createTableView();
var row = Ti.UI.createTableViewRow({
height: Ti.UI.SIZE,
width: Ti.UI.FILL
});
var view = Ti.UI.createView({
height: 150,
backgroundColor: 'blue'
});
row.add(view);
tableView.setData([ row ]);
tableView.addEventListener('postlayout', function onPostLayout() {
console.log('postlayout', row.rect.height, view.rect.height);
label.text = [row.rect.height, view.rect.height].join(' \| ');
});
top.add(btnPlus);
top.add(btnMinus);
top.add(label);
win.add(top);
win.add(tableView);
win.open();
*Test Steps:*
PR - https://github.com/appcelerator/titanium_mobile/pull/11758
FR Passed
Verified on: Mac OS: 10.15.4 SDK: 9.1.0.v20200727104531 Appc CLI: 8.1.0-master.7 JDK: 11.0.4 Node: 10.17.0 Studio: 6.0.0.202005141803 Xcode: 12.0 beta Device: iOS simulator 14.0 beta, 13.5
This is causing regressions. Reverted changes in [PR](https://github.com/appcelerator/titanium_mobile/pull/12128). Need to look in alternate way to fix it.
master: https://github.com/appcelerator/titanium_mobile/pull/12225
FR Passed. Waiting for Jenkins build
merged to master, backport to 9_2_X also merged
*Closing ticket*. Fix verified in SDK version
9.3.0.v20201119063936
. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/12225