carousell / pickle

Carousell flavoured image picker with multiple photo selections.
https://carousell.github.com/pickle
Apache License 2.0
60 stars 25 forks source link

Optional done button disabled state #48

Closed bcylin closed 5 years ago

bcylin commented 5 years ago

Add an optional delegate method to toggle the done bar button item based on the selected assets:

protocol ImagePickerControllerDelegate {

  /// Optional. Asks the delegate for the flag to enable the done bar button item based on the selected assets. The default behaviour `isEnabled = !assets.isEmpty`.
  @objc optional func imagePickerController(_ picker: ImagePickerController, shouldEnableDoneBarButtonItemWithSelected assets: [PHAsset]) -> Bool

}

Close #38.

carouselljenkins commented 5 years ago

@hungnguyenvn, can you review this pull request?