0

I'm trying to unblur my image slowly, i blurred it with this code

 let blur = UIBlurEffect(style: UIBlurEffectStyle.light)
        let blurView = UIVisualEffectView(effect: blur)
        blurView.frame = imageview.bounds
        imageview.addSubview(blurView)

then i tried to unblur my image with this code :

UIView.animate(withDuration: 6.0) {
            blurView.alpha = 0.5
}

The problem is that there is no effect going on, the image is loading with 0.5 alpha.

Korken55
  • 233
  • 1
  • 3
  • 14

1 Answers1

0

The problem was that my unblur effect was in the viewDidLoad Method, i had to put it in the viewDidApper Method.

Korken55
  • 233
  • 1
  • 3
  • 14