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

New feature: adding delegates #29

Open
colasbd opened this issue Jun 18, 2015 · 3 comments
Open

New feature: adding delegates #29

colasbd opened this issue Jun 18, 2015 · 3 comments

Comments

@colasbd
Copy link

colasbd commented Jun 18, 2015

Hi,

I'm thinking of a new feature: adding a delegate:

@protocol NYSegmentedControlDelegate <NSObject>

- (void)segmentedControl:(NYSegmentedControl *)segmentedControl willSelectIndex:(NSUInteger)index ;
- (void)segmentedControl:(NYSegmentedControl *)segmentedControl didSelectIndex:(NSUInteger)index ;

- (void)segmentedControl:(NYSegmentedControl *)segmentedControl willUnselectIndex:(NSUInteger)index ;
- (void)segmentedControl:(NYSegmentedControl *)segmentedControl didUnselectIndex:(NSUInteger)index ;

@end

What do you think? Good idea? Easy to implement?

If you are OK, I can do a PR.

@colasbd
Copy link
Author

colasbd commented Aug 19, 2015

@nealyoung
Have you seen my message? Thanks

@calios
Copy link

calios commented Oct 10, 2015

@colasjojo I'm just facing the exactly same problem as you mentioned above. Have you completed it? Thanks in advance.

@Horse888
Copy link

Since NYSegmentedControl inherit from UIControl, you can just use UIControlEventValueChanged to get the seg value change.

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

No branches or pull requests

3 participants