bug fix with caption view

This commit is contained in:
Alexsander Khitev 2016-03-24 00:32:46 +04:00
parent 6be05c875d
commit b68ec817d3
1 changed files with 2 additions and 0 deletions

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