0

I’m currently working on an iOS App. As for usual, on the first launch we have a tutorial. The ViewController that is shown after the tutorial (either you skip it or not) is login screen view controller. The background of this VC is a blurred image. And to get the blur effect I’m using UIImage+ImageEffects.h.

It seems to take quite a long time (about 5 seconds) to load my VC. But if I comment the line with the blur effect that works like a charm. Do I have anyway of working around this problem? Of course, since the image is static, I have considered using an already blurred image. But on other places in my app I’m gonna use blur effects too. So, I'd like to know if there is a more efficient alternative.

I have seen the question related:

iOS: How to efficiently blur an image? but it didn't help me.

Community
  • 1
  • 1
ealbizzati
  • 11
  • 1
  • 2
    `UIImage+ImageEffects.h` has long been useless since iOS 8 came out with [UIVisualEffectView](http://www.raywenderlich.com/84043/ios-8-visual-effects-tutorial), give that a look! – Jack Dec 22 '15 at 20:11
  • If you have to support iOS7, I've been using the `CIGaussianBlur` filter from `CoreImage` which is reasonably fast and you can do it on a background thread so you don't have to block your app while it is processing – dan Dec 22 '15 at 20:33
  • The project referenced by this answer helped me with creating a fast blur in iOS 7 devices: http://stackoverflow.com/a/9601113/1176870 – Chris Stillwell Dec 22 '15 at 21:41

2 Answers2

2

Apple provides UIVisualEffectView to get the iOS blur effect. I've used a couple of different solutions, including categories on UIImage and GPUImage's iOS7BlurFilter but I've gotten best results with UIVisualEffectView.

geraldWilliam
  • 4,123
  • 1
  • 23
  • 35
0

I had shared the code for blur effect, you refer the same. How To Add Visual Effect Views Blur On All Views Storyboard iOS?

It is working on iOS 7 and above.

Community
  • 1
  • 1
Ankit Thakur
  • 4,739
  • 1
  • 19
  • 35