I have one label which have a Dynamic string data e.g: "I am Mohit" .I want to make only "am" in bold.Is it Possible in iphone? if yes please give me suggestion.Thanks in advance:)
Asked
Active
Viewed 292 times
-1
-
try this link : http://cocoacontrols.com/platforms/ios/controls/rtlabel – hchouhan02 Mar 12 '12 at 09:17
-
possible duplicate of [iPhone - UILabel containing text with multiple fonts at the same time](http://stackoverflow.com/questions/1417346/iphone-uilabel-containing-text-with-multiple-fonts-at-the-same-time) – petert Mar 12 '12 at 09:18
-
try this Thread,...i hope you got ur answer.. http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel – Arun Mar 12 '12 at 09:28
5 Answers
1
No you can't have text with different styles in standard UILabel. What you'll probably need to use is NSAttributedString
and some custom solution to display them. Check this question for some possible options.
0
No you can't have text with different styles in standard UILabel. You need to use NSAttributedString and some custom solution to display them. Check this

Community
- 1
- 1

Kapil Kumar
- 104
- 8
0
done something like this using three20's TTStyledTextLabel :) it works perfectly

janusfidel
- 8,036
- 4
- 30
- 53
-1
you can use textView instead of label to fulfill your requirement.
ex:-
[textview setContentToHTMLString:@""];

Sirji
- 554
- 6
- 9
-
This method is now deprecated. If you use this method in your app then apple will reject your app. – SJS Oct 10 '12 at 13:07