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

UIControlEventValueChanged for HMSegmentedControl not called on page swipe. #24

Open
zeeshankhan opened this issue Feb 27, 2016 · 5 comments

Comments

@zeeshankhan
Copy link

Hi,

When we swipe pages, HMSegmentedControl's UIControlEventValueChanged event is not getting triggered.
I've added an action to pageControl which listens to UIControlEventValueChanged event. which is not getting called on page swipe. Any help?
I tried adding an observer to selectedSegmentIndex property of pageControl, but this is not working on right swipe gesture.
I even tried finding swipe gesture of pageViewController but that property is nil.
The solution I see is to expose - (void)setSelectedSegmentIndex:(NSUInteger)index animated:(BOOL)animated notify:(BOOL)notify function from HMSegmentedControl class and call it on didFinishAnimating of UIPageViewController with notify=true.

@hons82 Please let me know, if you have anything in mind. Thanks :)

@hons82
Copy link
Owner

hons82 commented Feb 29, 2016

Where did you try that?
One of my samples?
iOS version? Simulator?

@zeeshankhan
Copy link
Author

I tried it on my application, running with iOS 9.2.
Actually It's an issue of HMSegmentedControl class, which does not call UIControlEventValueChanged event.
The only way I see is to manually add these files into my project and fix this thing.
What do you say?

@hons82
Copy link
Owner

hons82 commented Feb 29, 2016

In that case it would maybe make sense to fork the HMSegmentedControl and change it there + PR

@zeeshankhan
Copy link
Author

Yeah, will do it. Once that get merged, will raise another PR here :)

@hons82
Copy link
Owner

hons82 commented Feb 29, 2016

Thx... lets c if he's responding in a reasonable amount of time, otherwise, we'll have to create a custom version of HMSegmenetedControl, as I've done in the past too

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

2 participants