ThumbnailView object contains a set of thumbnails, each of which represents images.
extension ViewController: ThumbnailViewDataSource {
func numberOfItems(in thumbnailView: ThumbnailView) -> Int {
return images.count
}
func thumbnailView(_ thumbnailView: ThumbnailView, thumbnailForItemAt index: Int, size: CGSize, completion: @escaping (UIImage?) -> Void) {
// load image
completion(image)
}
}
- Swift 4
- iOS 8
- Using Carthage:
github "Jaesung-Jung/ThumbnailView"
$ carthage update
ThumbnailView is under MIT license. See the LICENSE for more info.