How to set NSString's background cornerRadius on iOS7

后端 未结 6 697
长情又很酷
长情又很酷 2020-12-01 02:12

I want to set NSString\'s background cornerRadius on iOS7. But,NSString don\'t have layer...

Please tell me, how to set NSString\'s background cornerRadius on iOS7?<

6条回答
  •  暖寄归人
    2020-12-01 03:02

    NSString doesn't have that. NSAttributedString has a backgroundColor property that can be used but without custom rendering, you won't be able to set a corner radius for the selection of text fragments.

    So you need to write a custom UIView to render your text

提交回复
热议问题