ABC
ABC

Reputation: 718

Creating translucent UIView with gaussian blur

I am in the process of creating an app where I have a background image (a UIImageView with the frame set to the UIView's bounds and added as a subview).

I would like to now add a UIView that will be over the background image but will apply gaussian blur to the image behind, only over the area where the UIView is.

I have just tried to use GPUImage to create a blur, which looks good but it uses 2 UIImageViews (one large background and one behind the UIView, which is blurred). Unfortunately the image no longer matches up with the background.

Is there any way to get the UIView to blur only the area behind it? A bit like the UIView is frosting the image behind.

Thanks!

Upvotes: 0

Views: 2226

Answers (1)

Xcoder
Xcoder

Reputation: 1807

Try FXBlurView from here - https://github.com/nicklockwood/FXBlurView It should work.

Upvotes: 2

Related Questions