add single tap to dismiss

This commit is contained in:
ghysrc 2016-05-13 15:18:26 +08:00
parent f162983b70
commit 6b64f75c8d
2 changed files with 6 additions and 1 deletions

View File

@ -307,7 +307,11 @@ public class SKZoomingScrollView: UIScrollView, UIScrollViewDelegate, SKDetectin
// MARK: - SKDetectingImageViewDelegate
func handleImageViewSingleTap(touchPoint: CGPoint) {
photoBrowser?.performCloseAnimationWithScrollView(self)
if photoBrowser!.enableSingleTapDismiss {
photoBrowser?.performCloseAnimationWithScrollView(self)
} else {
photoBrowser?.toggleControls()
}
}
func handleImageViewDoubleTap(touchPoint: CGPoint) {

View File

@ -89,6 +89,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, UICollection
browser.displayDeleteButton = true
browser.statusBarStyle = .LightContent
browser.bounceAnimation = true
// browser.enableSingleTapDismiss = true
// Can hide the action button by setting to false
browser.displayAction = true