[clean]some.

This commit is contained in:
suzuki_keishi 2016-02-22 18:47:22 +09:00
parent 54895a1ee5
commit e915b09ee5
1 changed files with 6 additions and 5 deletions

View File

@ -61,8 +61,8 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate, UIActionShe
private var doneButtonHideFrame: CGRect = CGRect(x: 5, y: -20, width: 44, height: 44)
private var deleteButton: UIButton!
private var deleteButtonShowFrame: CGRect = CGRect(x: UIScreen.mainScreen().bounds.size.width - 60, y: 5, width: 44, height: 44)
private var deleteButtonHideFrame: CGRect = CGRect(x: UIScreen.mainScreen().bounds.size.width - 60, y: -20, width: 44, height: 44)
private var deleteButtonShowFrame: CGRect = CGRect(x: UIScreen.mainScreen().bounds.size.width - 44 - 5, y: 5, width: 44, height: 44)
private var deleteButtonHideFrame: CGRect = CGRect(x: UIScreen.mainScreen().bounds.size.width - 44 - 5, y: -20, width: 44, height: 44)
// photo's paging
private var visiblePages: Set<SKZoomingScrollView> = Set()
@ -865,9 +865,10 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate, UIActionShe
}
func deletePhoto(avc:UIAlertAction) -> Void{
let index = photos[currentPageIndex].index
deleted.append(index!)
print(deleted)
guard let index = photos[currentPageIndex].index else {
return
}
deleted.append(index)
if photos.count == 1 {
dismissPhotoBrowser()
} else {