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

Value did change #244

Open
tbaranes opened this issue Dec 17, 2015 · 8 comments
Open

Value did change #244

tbaranes opened this issue Dec 17, 2015 · 8 comments

Comments

@tbaranes
Copy link

I was looking for a delegate or block to have a "valueDidChange" callback, but can't found one. I suppose that didn't be implemented?

@tbaranes
Copy link
Author

After looking in the code, I'm not sure what would be the best solution to implement this feature in order to respect the current architecture:

  • A delegate firing a selectedRowDidChange:(NSInteger)rowSelected selectedValue:(id)selectedValue, it could copy the actionSheetPickerDidCancel:(AbstractActionSheetPicker *)actionSheetPicker origin:(id)origin; implementation
  • Add a new showPickerWithTitle: with a third block selectedRowDidChange:
  • Just make selectedIndex KVO compliant
  • The three above solutions (more flexible)

What do you think?

@skywinder
Copy link
Owner

@tbaranes Do you mind submitting a pull request with this? I agree with you.

@tbaranes
Copy link
Author

Alright, I will work on this next week. Which final implementation do your prefer?

@skywinder
Copy link
Owner

1-st and 2nd is more common cases. So, let's go with this options! 👍

@tbaranes
Copy link
Author

tbaranes commented Jan 7, 2016

Well, finally I didn't get the time to do it. If not done later, I will do it! :)

@skywinder
Copy link
Owner

@tbaranes thank you! no rush 👍

@ghost
Copy link

ghost commented Jun 28, 2016

Hey @skywinder , I need this feature in my app. I need to change 2nd rows value according to 1st row selected Value...

@skywinder
Copy link
Owner

@SnehaDudhat nothing is impossible!
Please have a look how AbstractActionSheetPicker looks like. it also

change 2nd rows value according to 1st row selected Value

You can also create your picker based on AbstractActionSheetPicker or ActionSheetCustomPicker to implement it.

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
@tbaranes @skywinder and others