Simple category that helps you create a blurred image iOS7-style based on another image or a view (e.g: myViewController.view).
- Copy the folder JTBlurredImageCategory to your XCode project
- Import the category in the parent View Controller, or where the original image you need to apply the blur effect is located, using
#import "UIImage+BlurEffect.h"
- Create a new
UImage
withUIImage *backgroundBlurredImage = [UIImage getBlurredScreenshotFromView:self.view size:[[UIScreen mainScreen] bounds].size blurffect:BlurEffect];
and pass this image to the presenting View Controller - Apply the blurred image to the view controller background with
self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:_blurredBackgroundImage];
iOS 7 is required for the blurred effects to work.
It comes with 4 pre-defined blurred effects but you could play with the values to get some different effects.
- BlurEffect
- BlurEffectLight
- BlurEffectExtraLight
- BlurEffectDark
Released under the terms of the MIT license.
Enjoy โบ