I have a moving background image and I want to blur the bottom part of it out. I would do it with just photoshop but since the image moves, it wouldn’t work very well.
Here is what I mean (look at the bottom of the image) :
So basically like the effect the dock has on the iPhone. I’m using iOS 8 but not Swift.
2
Answers
I have done a small example based on the photo you have there. My algorithm is as follows:
Here is a source code for doing so,
And here is the screenshot of the result.
Apple has a
UIView
for this. It’s calledUIVisualEffectView
. In the below example, I just simply dragged in aUIVisualEffectView
in interface builder.Here is my ViewController Code.
Here is my Storyboard source code: