[TIMOB-2799] iPhone: Change label width on swipe
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-07-26T14:09:24.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | aarmenta |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:29:49.000+0000 |
Updated | 2012-07-26T20:40:21.000+0000 |
Description
I have a tableView that contains a label visible and a hidden
button. When I swipe the row it should reduces the width of the
label for the button to display. This works perfectly with SDK
1.4.3 but not with 1.5.1.
I attach source code that proves the above:
var tableView = Titanium.UI.createTableView();
var rows = [];
var row = Titanium.UI.createTableViewRow();
var label1 = Titanium.UI.createLabel({
text:'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse adipiscing.',
width:300,
font:{fontSize:12,fontFamily:'Helvetica Neue'},
});
row.add(label1);
var b1 = Ti.UI.createButton({
title:'button',
height:30,
width:90,
right:10,
visible: false
});
row.add(b1);
var swiped = '';
row.addEventListener('swipe', function (e) {swiped = e.direction;});
row.addEventListener('touchend', function (e) {
if (swiped == 'left'){
label1.width = 200;
b1.show();
}
});
rows.push(row);
tableView.setData(rows);
Titanium.UI.currentWindow.add(tableView);
Tested against SDK 2.2.0.014b86f, iPhone Sim 5.1. Cannot reproduce as described (button appears so assume it "works perfectly").