|Blur image effect iOS|
In this post we will learn, ho can we add blur effect to our view in iOS SDK/ iPhone development. As shown in above header image.
Download the files from given below link as they are required in order to achieve the blur effect.
Now open your Xcode project and import two files required to create blur effect in the file where you need to add blur effect.
Below is the code that creates the nice blur effect
UIImage *imageScreenShot = [UIImage screenshot];
UIImage *blurred = [imageScreenShot applyLightEffect];
UIImageView *blurrImageView = [[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds];
blurrImageView.image = blurred;
[[UIApplication sharedApplication].delegate.window addSubview:blurrImageView];
In above code first we capture screenshot of our view. Then we applied the blur effect to the captured screenshot image. Finally we present the blurred image to our UIImageView and add it to our app window as subview.
Complete Code: Click to download