KenBurns
KenBurns copied to clipboard
fun queueNextImage -> Fatal error: Unexpectedly found nil while unwrapping an Optional value: file
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file Pods/KenBurns/KenBurns/Classes/KenBurns.swift, line 327
I'm not using a Queue but the library is trying to load a next image from the queue. in the following line 327
func queueNextImage() {
if remoteQueue {
if imagePlaceholders == nil {
nextImageView.kf.setImage(with: imageURLs!.read()!, placeholder: nil, options: [.transition(.fade(0.2))])
nextImageView.kf.indicatorType = .activity
} else {
nextImageView.kf.setImage(with: imageURLs!.read()!, placeholder: nil, options: [.transition(.fade(0.2))])
nextImageView.kf.indicatorType = .activity
}
} else {
nextImageView.image = imageQueue!.read() //Line 327
}
}
You can just add a guard in the meantime
guard let queue = imageQueue else { nextImageView.image = currentImageView.image return }