I have a set of images that i would like to have fade in the background of my login screen. I cant find anything in swift that can do this. Is there a way that i would be able to?
Heres my current code:
override func viewDidLoad() {
super.viewDidLoad()
startAnimating()
// Do any additional setup after loading the view, typically from a nib.
}
func startAnimating(){
backgroundImage.animationImages = [
UIImage(named: "background1.jpg"),
UIImage(named: "background2.jpg")
]
backgroundImage.animationDuration = 3
backgroundImage.startAnimating()
}
The below code will help you to animate image with fadeOut effect and change the background.