iPhone UILabel text soft shadow

前端 未结 15 972
时光取名叫无心
时光取名叫无心 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:15

    Apply the (soft) shadow on the view's layer, like this:

    UILabel *label = [[UIabel alloc] init];
    label.layer.shadowColor = [[UIColor whiteColor] CGColor];
    label.layer.shadowOpacity = 1.0;
    

提交回复
热议问题