diff --git a/MediaBrowser.podspec b/MediaBrowser.podspec index 4a86c7f..bb80156 100644 --- a/MediaBrowser.podspec +++ b/MediaBrowser.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'MediaBrowser' - s.version = '1.0.4' + s.version = '1.0.3' s.summary = 'A simple iOS photo and video browser with optional grid view, captions and selections written in Swift3.' s.description = <<-DESCRIPTION diff --git a/MediaBrowser/MediaBrowser.swift b/MediaBrowser/MediaBrowser.swift index 33fa0ca..923a1e6 100755 --- a/MediaBrowser/MediaBrowser.swift +++ b/MediaBrowser/MediaBrowser.swift @@ -1512,6 +1512,9 @@ public class MediaBrowser: UIViewController, UIScrollViewDelegate, UIActionSheet if let gc = gridController { if gc.selectionMode { self.title = NSLocalizedString("Select Photos", comment: "") + if let ab = actionButton { + self.navigationItem.rightBarButtonItem = ab + } } else { let photosText: String @@ -2056,7 +2059,8 @@ public class MediaBrowser: UIViewController, UIScrollViewDelegate, UIActionSheet // If they have defined a delegate method then just message them // Let delegate handle things if let d = delegate { - d.actionButtonPressed(at: currentPageIndex, in: self) + d.actionButtonPressed(at: currentPageIndex, in: self, sender: sender) + return } // Show activity view controller diff --git a/MediaBrowser/MediaBrowserDelegate.swift b/MediaBrowser/MediaBrowserDelegate.swift index ca92e07..199b0d6 100644 --- a/MediaBrowser/MediaBrowserDelegate.swift +++ b/MediaBrowser/MediaBrowserDelegate.swift @@ -67,7 +67,7 @@ public protocol MediaBrowserDelegate: class { - Parameter photoIndex: Int - Parameter mediaBrowser: MediaBrowser */ - func actionButtonPressed(at photoIndex: Int, in mediaBrowser: MediaBrowser) + func actionButtonPressed(at photoIndex: Int, in mediaBrowser: MediaBrowser, sender: Any?) /** @@ -114,7 +114,7 @@ public extension MediaBrowserDelegate { func didDisplayMedia(at index: Int, in mediaBrowser: MediaBrowser) { } - func actionButtonPressed(at photoIndex: Int, in mediaBrowser: MediaBrowser) { } + func actionButtonPressed(at photoIndex: Int, in mediaBrowser: MediaBrowser, sender: Any? = nil) { } func isMediaSelected(at index: Int, in mediaBrowser: MediaBrowser) -> Bool { return false }