Details
-
Type:
Bug
-
Status: Closed
-
Priority:
None
-
Resolution: Fixed
-
Affects Version/s: Release 9.0.2, Release 9.1.0
-
Fix Version/s: Release 9.3.0
-
Component/s: iOS
-
Labels:None
-
Environment:
MacOS Catalina: 10.15.5 Beta
Xcode: 11.4
Java Version: 1.8.0_131
Android NDK: 21.1.6273396-beta2
Node.js: 10.16.3
""NPM":"5.0.0-1","CLI":"8.0.0-master.10""
iphon 8 (13.4)
-
Story Points:3
-
Sprint:2020 Sprint 22
Description
When trying to get 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:
- Create a new application with the code above
- Run the application
- Click on the Minus and Plus buttons
- Notice label does not change with the correct the values (even though height of the tableViewRow changes)
Attachments
Issue Links
- is triggering
-
TIMOB-28148 iOS: app crashes when updating tableview
-
- Closed
-