How to create UILabel with clickable first word

后端 未结 4 1522
攒了一身酷
攒了一身酷 2020-12-20 18:28

I want to create label in iOS, can anyone help me to make the first word of the label\'s text bold and clickable. The label displays username and its comment and the first w

4条回答
  •  难免孤独
    2020-12-20 18:45

    • Make a custom button, which will contain the first word of your username, make text bold.
    • Take a label, just beside the custom button & write the rest part of your username other than the first word.
    • On the click event of the custom button, do whatever you want to do..

    Hope this will be clear to you.

    Enjoy Programming!

提交回复
热议问题