App crash on the LightBox Presend Option
sheikpunia1 opened this issue · comments
sheikpunia1 commented
When i select the multiple image's and and after that call it like this
func galleryController(_ controller: GalleryController, requestLightbox images: [Image]) {
LightboxConfig.DeleteButton.enabled = true
SVProgressHUD.show()
Image.resolve(images: images, completion: { [weak self] resolvedImages in
SVProgressHUD.dismiss()
self?.showLightbox(images: resolvedImages.compactMap({ $0 }))
})
}
// It give crash on this section on the
gallery.present(lightbox, animated: true, completion: nil) (Error says "Thread 1: Fatal error: Unexpectedly found nil while unwrapping")
let lightboxImages = images.map({ LightboxImage(image: $0) })
let lightbox = LightboxController(images: lightboxImages, startIndex: 0)
lightbox.dismissalDelegate = self
gallery.present(lightbox, animated: true, completion: nil)
Stefan Ritter commented
Same error here