Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional done button disabled state #48

Merged
merged 1 commit into from
May 5, 2019
Merged

Conversation

bcylin
Copy link
Collaborator

@bcylin bcylin commented May 1, 2019

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
Copy link

@HungnguyenVN, can you review this pull request?

@bcylin bcylin force-pushed the feature/disabled-done-button branch from 607d665 to d393176 Compare May 2, 2019 07:24
Copy link
Contributor

@amelia2801 amelia2801 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@bcylin bcylin merged commit 9100ce7 into master May 5, 2019
@bcylin bcylin deleted the feature/disabled-done-button branch May 5, 2019 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: make disabled done button optional
3 participants