[TIMOB-8982] iOS: Ti.UI.SIZE on the view, does not work on its child labels, that need to wrap text
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-05-22T16:14:31.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | Release 2.1.0, Sprint 2012-11 API |
Components | iOS |
Labels | api |
Reporter | Devang Gandhi |
Assignee | Vishal Duggal |
Created | 2012-05-03T17:07:20.000+0000 |
Updated | 2017-03-22T20:36:21.000+0000 |
Description
In the example,
we have two adjacent labels and a view in window and we want the view that contains the two labels to size its height to the largest label. The first label contains text that should wrap onto multiple lines. Instead of doing that it ellipsizes the text.
This behavior was possible in 1.8 versions of the SDK.
var win = Ti.UI.createWindow({
fullscreen : false,
backgroundColor : 'white'
});
var containerView1 = Ti.UI.createView({
top : '0dp',
left : '0dp',
backgroundColor : 'green',
height : Ti.UI.SIZE,
width : Ti.UI.SIZE
});
var label1 = Ti.UI.createLabel({
text : 'BLAH BLAH BLAH BLAH BLAH!',
top : '0dp',
left : '0dp',
textAlign : 'right',
width : '100dp',
});
var label2 = Ti.UI.createLabel({
text : 'BLAH BLAH!',
top : '0dp',
left : '108dp',
});
containerView1.add(label1);
containerView1.add(label2);
win.add(containerView1);
win.open();
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2012-05-03 at 10.25.34 AM.png | 2012-05-03T17:07:20.000+0000 | 92638 |
Duplicate of TIMOB-8713
Fix Back ported to 2_0_X by [PR2305](https://github.com/appcelerator/titanium_mobile/pull/2305) and the fix should be available on 2_0_X branch from commit [a43004b8e](https://github.com/appcelerator/titanium_mobile/commit/a43004b8eb830edfb22f8ef21f3d37ac1e6ab9f0)
Closing ticket as duplicate of the ticket that is mentioned above.