diff --git a/SKPhotoBrowser.podspec b/SKPhotoBrowser.podspec index c618f18..3be3e2d 100644 --- a/SKPhotoBrowser.podspec +++ b/SKPhotoBrowser.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SKPhotoBrowser" - s.version = "1.7.4" + s.version = "1.7.5" s.summary = "Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift2.0." s.homepage = "https://github.com/suzuki-0000/SKPhotoBrowser" s.license = { :type => "MIT", :file => "LICENSE" } diff --git a/SKPhotoBrowser/SKPhotoBrowser.swift b/SKPhotoBrowser/SKPhotoBrowser.swift index 3019340..72a790a 100644 --- a/SKPhotoBrowser/SKPhotoBrowser.swift +++ b/SKPhotoBrowser/SKPhotoBrowser.swift @@ -677,6 +677,8 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate { private func deleteImage() { if photos.count > 1 { + // index equals 0 because when we slide between photos delete button is hidden and user cannot to touch on delete button. And visible pages number equals 0 + visiblePages[0].captionView?.removeFromSuperview() photos.removeAtIndex(currentPageIndex) if currentPageIndex != 0 { gotoPreviousPage()