How do I create blurred text in an iPhone view?

后端 未结 4 1996
小蘑菇
小蘑菇 2020-12-16 05:30

I am building up a view with various text and image elements.

I want to display some text in the view with a blurry copy of the text behind it, but not just a text s

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-16 06:08

    You will take a performance hit if you use alpha layers. Consider a different approach if possible (maybe even precompositing the text and flattening it into a graphic instead of multiple layers).

    Try it, and use Instruments to check out the performance and see if it's acceptable. If you're doing it in a scrolling view, your scrolling will bog down a lot.

提交回复
热议问题