0

I made a blur image using UIBlureffect and it worked fine. I would like to add a vibrancy image but so far it has not worked

Current code:

@IBOutlet var imageViewGif: UIImageView!

func addEffect()
{
    var effect = UIBlurEffect(style: UIBlurEffectStyle.Dark)
    var effectView = UIVisualEffectView(effect: effect)
    effectView.frame = CGRectMake(0, 0, 400, 536)
    view.addSubview(effectView)
}

I would like to add an image that is not restricted to a preset area, and I would like the blur effect to adapt to the image area if possible (the image is not square).

If there is anything more you need, do not hesitate to ask!

hoijui
  • 3,615
  • 2
  • 33
  • 41
Nathannn
  • 161
  • 4
  • 16

1 Answers1

0

I solved this using the hierachy view and added the "visual effect with blur and vibrancy effect" from the object library.

Nathannn
  • 161
  • 4
  • 16