iPhone UILabel text soft shadow

前端 未结 15 933
时光取名叫无心
时光取名叫无心 2020-12-07 09:31

I know soft shadows are not supported by the UILabel out of the box, on the iPhone. So what would be the best way to implement my own one?

EDIT:

15条回答
  •  独厮守ぢ
    2020-12-07 10:14

    This answer to this similar question provides code for drawing a blurred shadow behind a UILabel. The author uses CGContextSetShadow() to generate the shadow for the drawn text.

提交回复
热议问题