Skip to content

Commit

Permalink
Fix selectLimitReachedClosure param naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Asher authored and mikaoj committed Sep 24, 2018
1 parent 5aae5cc commit 37dbfa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Extension/UIViewController+BSImagePicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public extension UIViewController {
- parameter cancel: Closure to call when user cancels or nil
- parameter finish: Closure to call when user finishes or nil
- parameter completion: presentation completed closure or nil
- parameter selectLimitReachedClosure: Closure to call when user reaches selection limit or nil
- parameter selectLimitReached: Closure to call when user reaches selection limit or nil
*/
@objc func bs_presentImagePickerController(_ imagePicker: BSImagePickerViewController, animated: Bool, select: ((_ asset: PHAsset) -> Void)?, deselect: ((_ asset: PHAsset) -> Void)?, cancel: (([PHAsset]) -> Void)?, finish: (([PHAsset]) -> Void)?, completion: (() -> Void)?, selectLimitReachedClosure: ((Int) -> Void)? = nil) {
@objc func bs_presentImagePickerController(_ imagePicker: BSImagePickerViewController, animated: Bool, select: ((_ asset: PHAsset) -> Void)?, deselect: ((_ asset: PHAsset) -> Void)?, cancel: (([PHAsset]) -> Void)?, finish: (([PHAsset]) -> Void)?, completion: (() -> Void)?, selectLimitReached: ((Int) -> Void)? = nil) {
BSImagePickerViewController.authorize(fromViewController: self) { (authorized) -> Void in
// Make sure we are authorized before proceding
guard authorized == true else { return }
Expand All @@ -49,7 +49,7 @@ public extension UIViewController {
imagePicker.photosViewController.deselectionClosure = deselect
imagePicker.photosViewController.cancelClosure = cancel
imagePicker.photosViewController.finishClosure = finish
imagePicker.photosViewController.selectLimitReachedClosure = selectLimitReachedClosure
imagePicker.photosViewController.selectLimitReachedClosure = selectLimitReached

// Present
self.present(imagePicker, animated: animated, completion: completion)
Expand Down

0 comments on commit 37dbfa6

Please sign in to comment.