SwiftPhotoGallery icon indicating copy to clipboard operation
SwiftPhotoGallery copied to clipboard

Update Page Control with Number of Images

Open ejuden opened this issue 5 years ago • 0 comments

Great code, update pageControl when getting "numberOfImagesInGallery" to keep it in sync.

SwiftPhotoGallery.swift file public func collectionView(_ imageCollectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { let numberOfImages = dataSource?.numberOfImagesInGallery(gallery: self) ?? 0 self.pageControl.numberOfPages = numberOfImages return(numberOfImages) }

ejuden avatar Feb 21 '20 19:02 ejuden