Search code examples
swiftsdwebimage

SDWebImage for Swift, Blur effect is it possible?


I am using SDWebImage for Swift in my project and I am trying to add a Blur effect to an image following the advance usage example found here.

More specifically I am trying to declare a SDImageBlurTransformer but when I start typing the option doesn't come up.

b

Is an image blur effect possible using SDWebImage package?


Solution

  • Make sure your Podfile refers to version 5.0 of the project and run a pod update. I have the code completion coming up properly on a new project using version 5.0 of SDWebImage.

    Screenshot of Xcode with code completion for SDImageBlurTransformer

    Here's my Podfile for reference:

    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'
    
    target 'BlurImage' do
      # Comment the next line if you don't want to use dynamic frameworks
      use_frameworks!
    
      pod 'SDWebImage', '~> 5.0'
    
    end