How do I animate in/out a gaussian blur effect in iOS?

后端 未结 5 675
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 09:32

For the whole iOS 7 feel, I want to apply a blur effect to a specific portion of the screen to obfuscate it, but I don\'t want to just throw the blur on instantly, I want to

5条回答
  •  囚心锁ツ
    2020-12-13 10:32

    I rarely suggest off the shelf solutions for coding problems. However, in this case, I would whole heartedly recommend LiveFrost. It's a really solid UIView subclass focused exclusively on replicating the popular iOS 7 gaussian blur effect.

    I would also encourage you to read the author's blog regarding his design decisions for this class. I have done a lot of research specifically in this topic since the release of iOS 7, and I have literally ZERO COMPLAINTS about this code.

    It even has blur animation out of the box! Good luck to you :)

提交回复
热议问题