UIImageView transition between different images with animation

Viewed 6176

i have this code which repeating fade in the same picture to the view controller forever

 override func viewDidAppear(_ animated: Bool) {
        let toImage = UIImage(named:"intro.png")
        UIView.transition(with: self.imageView,
                          duration:2,
                          options: [.repeat , .transitionCrossDissolve],
                          animations: { self.imageView.image = toImage},
                          completion: nil)


    }

Now i need it to such between four images every time fade in with different img for ever.

1 Answers
Related