IPhone Text Glow Effect

前端 未结 6 2126
借酒劲吻你
借酒劲吻你 2020-11-30 03:22

In my IPhone application, I want the text in UILabel to glow for a second, then fade for a sec;. Also i want to repeat this cycle for say 3 or 4 times.

Is this poss

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 03:55

    There are many ways to do this, with varying quality. One way would be to subclass UILabel, and implement some kind of gradient effect in coregraphics in the drawRect method.

    You can also play with the text shadow (change the colour and alpha) and see if you can come up with a decent glow.

    The easiest way is probably to make a transparent glow-outline image in photoshop and place it behind your text, and then do like mahboudz suggests... fade the image in and out using coreanimation.

提交回复
热议问题