[TIMOB-13398] iOS: support ellipsize property of Ti.UI.Label (parity)
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2015-08-25T15:16:25.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 5.0.0 |
| Components | iOS |
| Labels | parity, qe-3.4.1 |
| Reporter | Shawn Lipscomb |
| Assignee | Eric Merriman |
| Created | 2012-12-21T16:08:14.000+0000 |
| Updated | 2017-03-21T20:48:30.000+0000 |
Description
Android and mobileweb support the ellipsize property of Ti.UI.Label. Please add support for this property under iOS as well.
The pull request in TIMOB-13375 is interesting and someone should look at it.
Tested on 3.1.1GA, iOS simulator, this is working fine now. Resolving.
Then the API docs need to be updated: [http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Label-property-ellipsize]
Writing up the ticket for the change now. Thank you for bringing this to our attention.
Not quite fixed. I just did a ListView with a row template, which contains a label with ellipsize:false (also width:Ti.IU.SIZE and height:Ti.IU.SIZE), and that label still gets ellipsized.
...and documentation is still not updated as of 08/16/2013 when SDK 3.1.2.GA was released.
Tested the following code
The label still gets ellipsized. Mac osx 10.9.5 Mavericks Appcelerator Studio, build: 3.4.0.201409261245 Titanium SDK, build: 3.4.1.v20141003114920 acs@1.0.18 alloy 1.5.1 install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0 titanium-code-processor@1.1.1 Xcode6.1GM Device: iPhone 6 iOS 8.1bvar win = Ti.UI.createWindow({backgroundColor: 'white'}); var label = Ti.UI.createLabel({ ellipsize: false, text: "To be, or not to be--that is the question: \ Whether 'tis nobler in the mind to suffer \ The slings and arrows of outrageous fortune \ Or to take arms against a sea of troubles", width: 100, height: 100, }); win.add(label); win.open();Relating to new ticket TIMOB-19357
PR here: https://github.com/appcelerator/titanium_mobile/pull/7061
Updated test code:
var win = Ti.UI.createWindow({backgroundColor: 'white'}); var label = Ti.UI.createLabel({ ellipsize: false, // ellipsize: true, // ellipsize: TEXT_ELLIPSIZE_TRUNCATE_START, // ellipsize: TEXT_ELLIPSIZE_TRUNCATE_MIDDLE, // ellipsize: TEXT_ELLIPSIZE_TRUNCATE_END, text: "To be, or not to be--that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune", width: 100, height: 100, }); win.add(label); win.open();PR approved & merged!
Closing ticket as fixed.