UILabel text Issue in iphone

后端 未结 5 1447
醉话见心
醉话见心 2021-01-29 08:40

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 ad

相关标签:
5条回答
  • 2021-01-29 09:23

    you can use textView instead of label to fulfill your requirement.

    ex:-

    [textview setContentToHTMLString:@""];

    0 讨论(0)
  • 2021-01-29 09:29

    done something like this using three20's TTStyledTextLabel :) it works perfectly

    0 讨论(0)
  • 2021-01-29 09:31

    Not with UILabel. Suggest 2 labels, or subclass. Many related answers, including this.

    0 讨论(0)
  • 2021-01-29 09:31

    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

    0 讨论(0)
  • 2021-01-29 09:40

    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 讨论(0)
提交回复
热议问题