Merge pull request #63 from alexsandersky/master
fixed bug with captionView when we are deleting photo
This commit is contained in:
commit
975c81307e
|
|
@ -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" }
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue