Merge pull request #63 from alexsandersky/master

fixed bug with captionView when we are deleting photo
This commit is contained in:
Alexsander Khitev 2016-03-24 00:40:01 +04:00
commit 975c81307e
2 changed files with 3 additions and 1 deletions

View File

@ -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" }

View File

@ -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()