I'm attempting to forego using NSAttributedString in my viewController, opting to use the 'Attributed' option (as apposed to 'Plain') in the 'text' field of the attributes inspector for a UILabel.
I've selected the individual words I want to attribute, and have changed their font, this is reflected correctly in the text preview window and on the scenes in IB itself:
However, the simulator does not reflect these changes, it seems as though at runtime the font specified for the attributes is not used (when I change a color, this works as expected). I've added the fonts to my project and to my plist to no avail:
I've found no documentation on this feature and it may very well be similar to the 'text styles' feature in IB (essentially useless for now) - but just wanted to see if anyone had had any luck doing something similar in the past.
Any help or suggestions is much appreciated, thanks.
Edit 03/07/15 Well, I'm pleased to report that this issue is finally resolved in Xcode 7 (still in beta). So we can finally put this issue to rest. Thanks to everyone who tried to figure this out along with me.
Try This
In my case when i try to set "Silversky Technology" as Attributed text for label from interface builder its not show when i run in simulator but its show in interface builder. So i used one trick i made Silversky font with 1 pixel bigger then Technology text.
Attribute text have issue with same size of font so change size of 1 word this thing work with me.
May be this is xcode bug but this trick work for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With