We want to animate the images using animationImages propery of UIImageView in our app. There are 45 heif images with dimensions of 1668x2388. Below is the code i am using to animate images.
let imageViewAnimation = UIImageView()
imgViewAnimation.animationImages = images
imgViewAnimation.animationDuration = 5.0
imgViewAnimation.animationRepeatCount = 1
imgViewAnimation.startAnimating()
Timer.scheduledTimer(withTimeInterval: 5.0 + 0.5, repeats: false) { _ in
DispatchQueue.main.async {
self.showAlert()
}
}
The issue i am facing is, it takes more than 5.0 seconds (animationDuration) to display all the images. Alert is shown before all the images are shown.
We face this issue only for few sets of images. For some other sets, it is working fine. Is this issue due to heif images used, or due to memory and CPU load of using large number of images.