How to apply text shadow to UITextView?

前端 未结 7 1069
醉梦人生
醉梦人生 2021-02-06 21:12

Actually I love UILabel. They\'re sweet. Now I had to go to UITextView because UILabel is not aligning text vertically to the top. Damn. O

7条回答
  •  醉酒成梦
    2021-02-06 21:52

    It depends on the version of iOS you are using. Beginning with iOS 6 there is a single shadow supported, you set that as an attribute on an NSAttributedString that you then set onthe label.

提交回复
热议问题