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

Add optional customizable cancelBarButtonItem and doneBarButtonItem #11

Merged
merged 2 commits into from
Jul 18, 2017

Conversation

jianyaoang
Copy link
Contributor

Add optional UIBarButtonItems in ImagePickerConfigurable to customise appearance of cancelBarButtonItem and doneBarButtonItem.

@jianyaoang jianyaoang requested a review from bcylin July 18, 2017 10:49
@carouselljenkins
Copy link

@darrenchen1223, can you review this pull request?

Copy link
Collaborator

@bcylin bcylin left a comment

Choose a reason for hiding this comment

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

Looks good 👍

Can you rebase the master branch to run the tests with these changes?

@@ -70,6 +70,10 @@ internal class CarousellImagePickerController: ImagePickerController {

private struct CarousellTheme: ImagePickerConfigurable {

let cancelBarButtonItem: UIBarButtonItem? = UIBarButtonItem(barButtonSystemItem: .stop, target: nil, action: nil)

let doneBarButtonItem: UIBarButtonItem? = UIBarButtonItem(title: "Next", style: .plain, target: nil, action: nil)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be better to use NSLocalizedString like imagePicker.button.camera? so we can later update the translation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just noticed that it's for the example app. It should be alright. 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

var cancelBarButtonItem: UIBarButtonItem? { get }

/// A custom bar button item displayed on the right (or trailing) edge of the navigation bar when the receiver is the top navigation item.
var doneBarButtonItem: UIBarButtonItem? { get }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Documented++

@jianyaoang jianyaoang force-pushed the feature/custom-edit-done-barbutton branch from 4cb36a8 to b7d16ae Compare July 18, 2017 11:46
Copy link
Collaborator

@bcylin bcylin left a comment

Choose a reason for hiding this comment

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

:shipit:

@jianyaoang jianyaoang merged commit eeaa686 into master Jul 18, 2017
@jianyaoang jianyaoang deleted the feature/custom-edit-done-barbutton branch July 18, 2017 15:08
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.

3 participants