I ran into this problem. My solution is not perfect, but it will work in all cases that do not require a dynamic background. After reading the following comment, How to create an effect similar to the look of blur iOS 7? . I realized that trying to find a way to change the toolbar would lead to nothing. So let's use the image!
In the Apple Application Developers Site, you can find ImageEffects and find the code that we will use. It comes with the iOS 8 blur effect you're familiar with, Light , ExtraLight and Dark .
Here's the .h file with our own class extension below to make things a little easier.
@import UIKit; @interface UIImage (ImageEffects) - (UIImage *)applyLightEffect; - (UIImage *)applyExtraLightEffect; - (UIImage *)applyDarkEffect; - (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor; - (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage; @end @interface UIView (MyImageEffects) - (UIImage *)lightBlurredSnapshot; - (UIImage *)extraLightBlurredSnapshot; - (UIImage *)darkBlurredSnapshot; - (UIImage *)blurredSnapshotWithColor:(UIColor *)tintColor; @end
And the .m file.
Now you can just import the header and call something like this.
UIImage* image = [self.view lightBlurredSnapshot]; UIImageView* imageView = [[UIImageView alloc] initWithImage:image];
Apply your mask to the layer and you're good to go!
source share