zvonicek / ImageSlideshow

Swift image slideshow with circular scrolling, timer and full screen viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tap image to show but nothing come out except a black collectionview

TomJoe2021 opened this issue · comments

commented

hello~
tap image to show. but imageslideshow gives me a black VC, the collectionview which holds the images, has empty datasource??. while pretty sure gave no empty datasource. this sometimes happen, can anyone help?

below is my code:
1:
var imgSources = ImageSource
imgSources.removeAll()
for indexImgName in m.img_data {
imgSources.append(ImageSource.init(image: imgView.image!)); //this imgView show the image succeed!
imgView.hb_tapped {
self.handlePosterImgClicked(clickIndex:m.img_data.firstIndex(of: indexImgName)!,
referenceImgView: imgView,
imgSources: imgSources)
}
}
2,
var slideshowTransitioningDelegate: ZoomAnimatedTransitioningDelegate? = nil
3, tap image:
func handlePosterImgClicked(clickIndex:Int,referenceImgView:UIImageView,imgSources:[ImageSource]) {

    let fullScreenController = FullScreenSlideshowViewController()
    fullScreenController.inputs = imgSources
    fullScreenController.initialPage = clickIndex
    
    slideshowTransitioningDelegate = ZoomAnimatedTransitioningDelegate(imageView: referenceImgView, slideshowController: fullScreenController)
    fullScreenController.modalPresentationStyle = .custom
    fullScreenController.transitioningDelegate = slideshowTransitioningDelegate
    self.slideshowTransitioningDelegate?.referenceImageView = referenceImgView

    self.hb_getCurrentNav()!.present(fullScreenController, animated: true, completion: nil)
}
commented

about my phone:
version:15.4.1
model: Xs
my app: ios, '11.0'

commented

closing for