nicklockwood / FXBlurView

[DEPRECATED]
Other
4.94k stars 713 forks source link

Using UIColor alpha and changing blend modes #57

Closed CaseyB closed 9 years ago

CaseyB commented 10 years ago

I needed to have a blur view that darkened the view below it. I found that using kCGBlendModeNormal improved results across a range of colors and allowing the user to set the transparency in InterfaceBuilder helped get the effect we needed.

nicklockwood commented 10 years ago

You can achieve this by just adding a subview inside your blurview with a translucent background.

CaseyB commented 10 years ago

But that makes your view hierarchy deeper and more processor intensive. On Apr 11, 2014 6:08 AM, "Nick Lockwood" notifications@github.com wrote:

You can achieve this by just adding a subview inside your blurview with a translucent background.

Reply to this email directly or view it on GitHubhttps://github.com/nicklockwood/FXBlurView/pull/57#issuecomment-40188914 .

nicklockwood commented 10 years ago

I would be surprised if you can detect any performance impact from adding that subview, and the rendering should actually be more efficient, since view background colours are composited on the GPU instead of using software drawing.