From b68ec817d3973d508dcd95891ced51e0750a5404 Mon Sep 17 00:00:00 2001 From: Alexsander Khitev Date: Thu, 24 Mar 2016 00:32:46 +0400 Subject: [PATCH] bug fix with caption view --- SKPhotoBrowser/SKPhotoBrowser.swift | 2 ++ 1 file changed, 2 insertions(+) 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()