From 327ff4a271b7d1cbb8e089d1a6ae7251468f22f5 Mon Sep 17 00:00:00 2001 From: Keishi Suzuki Date: Thu, 29 Mar 2018 10:47:13 +0900 Subject: [PATCH] bug fix and merge pull request. (see change.md) --- CHANGELOG.md | 6 ++++++ SKPhotoBrowser/SKPaginationView.swift | 2 ++ SKPhotoBrowser/SKPhotoBrowser.swift | 5 ++--- SKPhotoBrowser/SKZoomingScrollView.swift | 3 ++- .../FromCameraRollViewController.swift | 1 - .../SKPhotoBrowserExample/FromLocalViewController.swift | 4 ---- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8f80d8f..dafe1bcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 5.0.7 + +#### Updated +- #301 SKPhotoBrowserOptions.displayCounterLabel is not working +- #297 I want to hide SKPagingScrollView's horizontal indicator by mothule + ## 5.0.6 #### Updated diff --git a/SKPhotoBrowser/SKPaginationView.swift b/SKPhotoBrowser/SKPaginationView.swift index 8c4a6764..fe377526 100644 --- a/SKPhotoBrowser/SKPaginationView.swift +++ b/SKPhotoBrowser/SKPaginationView.swift @@ -85,6 +85,8 @@ private extension SKPaginationView { } func setupCounterLabel() { + guard SKPhotoBrowserOptions.displayCounterLabel else { return } + let label = UILabel(frame: CGRect(x: 0, y: 0, width: 100, height: 50)) label.center = CGPoint(x: frame.width / 2, y: frame.height / 2) label.textAlignment = .center diff --git a/SKPhotoBrowser/SKPhotoBrowser.swift b/SKPhotoBrowser/SKPhotoBrowser.swift index cd0fffdf..d230a885 100644 --- a/SKPhotoBrowser/SKPhotoBrowser.swift +++ b/SKPhotoBrowser/SKPhotoBrowser.swift @@ -538,9 +538,8 @@ private extension SKPhotoBrowser { } func configureGestureControl() { - guard !SKPhotoBrowserOptions.disableVerticalSwipe else { - return - } + guard !SKPhotoBrowserOptions.disableVerticalSwipe else { return } + panGesture = UIPanGestureRecognizer(target: self, action: #selector(SKPhotoBrowser.panGestureRecognized(_:))) panGesture?.minimumNumberOfTouches = 1 panGesture?.maximumNumberOfTouches = 1 diff --git a/SKPhotoBrowser/SKZoomingScrollView.swift b/SKPhotoBrowser/SKZoomingScrollView.swift index 53204bf6..3cacd93b 100644 --- a/SKPhotoBrowser/SKZoomingScrollView.swift +++ b/SKPhotoBrowser/SKZoomingScrollView.swift @@ -22,8 +22,9 @@ open class SKZoomingScrollView: UIScrollView { } } - fileprivate(set) var imageView: SKDetectingImageView! fileprivate weak var browser: SKPhotoBrowser? + + fileprivate(set) var imageView: SKDetectingImageView! fileprivate var tapView: SKDetectingView! fileprivate var indicatorView: SKIndicatorView! diff --git a/SKPhotoBrowserExample/SKPhotoBrowserExample/FromCameraRollViewController.swift b/SKPhotoBrowserExample/SKPhotoBrowserExample/FromCameraRollViewController.swift index 741a5feb..72858626 100644 --- a/SKPhotoBrowserExample/SKPhotoBrowserExample/FromCameraRollViewController.swift +++ b/SKPhotoBrowserExample/SKPhotoBrowserExample/FromCameraRollViewController.swift @@ -68,7 +68,6 @@ class FromCameraRollViewController: UIViewController, SKPhotoBrowserDelegate, UI } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "exampleCollectionViewCell", for: indexPath) let asset = assets[(indexPath as NSIndexPath).row] diff --git a/SKPhotoBrowserExample/SKPhotoBrowserExample/FromLocalViewController.swift b/SKPhotoBrowserExample/SKPhotoBrowserExample/FromLocalViewController.swift index d2cff5dd..e9ef77f2 100644 --- a/SKPhotoBrowserExample/SKPhotoBrowserExample/FromLocalViewController.swift +++ b/SKPhotoBrowserExample/SKPhotoBrowserExample/FromLocalViewController.swift @@ -25,10 +25,6 @@ class FromLocalViewController: UIViewController, UICollectionViewDataSource, UIC setupCollectionView() } - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - } - override var prefersStatusBarHidden: Bool { return false }