Skip to content

Commit

Permalink
Clarify multiple images/urls use case in README
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGorman committed May 7, 2018
1 parent ff2f5d5 commit 3d7389a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ If you're displaying a `UICollectionView` and want to add support for zooming, y

```swift

// In case of an array of [UIImage]:
let agrume = Agrume(images: images, startIndex: indexPath.item, background: .blurred(.light))
// Or an array of [URL]:
// let agrume = Agrume(urls: urls, startIndex: indexPath.item, background: .blurred(.light))

agrume.didScroll = { [unowned self] index in
self.collectionView.scrollToItem(at: IndexPath(item: index, section: 0), at: [], animated: false)
}
Expand Down

0 comments on commit 3d7389a

Please sign in to comment.