Krisiacik / ImageViewer

An image viewer à la Twitter
MIT License
2.53k stars 385 forks source link

disable bounce #184

Open iad24 opened 6 years ago

iad24 commented 6 years ago

Im using v4.1.0.

  1. Possible to disable the horizontal scroll bounce? Im actually using this as an image viewer for a single photo. It means that there will be always 1 photo that i will be feeding to GalleryViewController.

  2. Possible to disable the swiping up and down to dismiss?

dispatchswift commented 6 years ago
  1. Sure is possible. Here's how:
    let galleryVC = GalleryViewController(startIndex: 0, itemsDataSource: nil, itemsDelegate: nil, displacedViewsDataSource: nil, configuration: galleryConfiguration())
    presentImageGallery(galleryVC)
private func galleryConfiguration() -> GalleryConfiguration {
   return [.swipeToDismissMode(.never)]
}