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 delegate for custom button pressed #33

Closed
alphamu opened this issue Sep 5, 2014 · 3 comments
Closed

Add delegate for custom button pressed #33

alphamu opened this issue Sep 5, 2014 · 3 comments
Milestone

Comments

@alphamu
Copy link

alphamu commented Sep 5, 2014

Feature request, please add a delegate that is called on a custom button being clicked.
The delegate can be called with or without the need to value in the picker.

@skywinder skywinder added this to the V.1.2 milestone Sep 5, 2014
@allanrvj
Copy link

allanrvj commented Oct 3, 2014

There's a workaround for this, at least on the ActionSheetDatePicker. Make a subclass of the ActionSheetDatePicker and override the method

- (void)customButtonPressed:(id)sender

You can put your custom code inside. In my case I added a property to the subclass, which is a block, similar to ActionDateDoneBlock, and I called the block inside customButtonPressed.

Hope this helps someone :)

@skywinder
Copy link
Owner

@allanrvj Yes, it's a good workaround. Thanks for the hint.

@skywinder
Copy link
Owner

Good news everyone! @velga is kindly implement this feature in #81
The new feature is available since 1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants