Issue Description
Using Attributed String for label in Alloy, it is not showing up in iOS. Where as the same is working properly for Android and in classic.
Steps to reproduce
//Alloy
Create a new simple project application in alloy
Open the index.xml view
Add the next Label:
<Label>
<AttributedString class="as">
Appcelerator Titanium rocks!
</AttributedString>
</Label>
Open the index.tss Style
Add the next style:
".as" : {
attributes: [
{
type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,
value: 'red',
range: [0, 4]
}
]
}
Run
// Classic (Working project)
Create a new cassic default application project
Open the app.js file
Replace the content with the next code:
var win = Ti.UI.createWindow({
backgroundColor: "white"
});
var attr = Titanium.UI.createAttributedString({
text: "Appcelerator Rocks"
});
// Underlines text
attr.addAttribute({
type: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,
value: 'red',
range: [0, 4]
});
var label = Titanium.UI.createLabel({
left: 20,
right: 20,
height: Titanium.UI.SIZE,
attributedString: attr
});
win.add(label);
win.open();
Run
PR: https://github.com/appcelerator/alloy/pull/748 Test: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-961
PR merged.
Are you setting the Label color somewhere in tss? What do you see if you remove that?
Even removing the label color the attributed strings are not showing, but after some additional testing, I realized that this is only happening in iphone 6 and this is not happening on iPhone 5.
[~rramirez], this is what i get.
Here is what I get on iphone 5 and iphone 6S, I am using iOS simulator 9.2.
[~rramirez], it still works on my end. Ti SDK version 6.0.0.v20160107130337
I have tested with [~egomez] and he the result is the same, what we are doing to test is update the alloy version using sudo npm install -g alloy@1.7.31 change the alloy version in tiapp.xml clean and build. please let me know if we are missing something we are using the SDK 6.0.0.v20160111204825
Verified fixed, using: MacOS 10.11.3 (15D21) Studio 4.5.0.201601262138 Ti SDK 5.2.0.v20160202103508 Appc NPM 4.2.3-1 Appc CLI 5.2.0-239 Alloy 1.7.33 Xcode 7.2 (7C68) Attributed strings are working as expected in Alloy projects. Tested using provided samples and simple modifications to the default sample app.