Merge pull request #72 from komitake/issue-didDismissActionSheetWithButtonIndex

Fixed delegate didDismissActionSheetWithButtonIndex was not called
This commit is contained in:
Rummler 2016-04-01 17:08:39 +02:00
commit b1e2b73df4
1 changed files with 3 additions and 3 deletions

View File

@ -1179,9 +1179,9 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate {
let actionSheetController = UIAlertController(title: nil, message: nil, preferredStyle: .ActionSheet)
actionSheetController.addAction(UIAlertAction(title: "Cancel", style: .Cancel, handler: { (action) -> Void in
}))
for actionTitle in titles {
actionSheetController.addAction(UIAlertAction(title: actionTitle, style: .Default, handler: { (action) -> Void in
for idx in titles.indices {
actionSheetController.addAction(UIAlertAction(title: titles[idx], style: .Default, handler: { (action) -> Void in
self.delegate?.didDismissActionSheetWithButtonIndex?(idx, photoIndex: self.currentPageIndex)
}))
}