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

[iOS] Trouble with step value on Xamarin.iOS #29

Open
ghost opened this issue Dec 1, 2016 · 7 comments
Open

[iOS] Trouble with step value on Xamarin.iOS #29

ghost opened this issue Dec 1, 2016 · 7 comments
Labels

Comments

@ghost
Copy link

ghost commented Dec 1, 2016

Hi, I'm using the Xamarin nuget package on Android and iOS (not Forms). I want a slider with a step value of 10 going from 0 to 100 and I want to be able to freely changed the value of the slider and the snap to step value occurs only when I let go.

On Android, it is working nicely, but I have trouble on iOS. Even without step value, the slider control is "jittering", it is hardly moving freely and always stops in the movement, I wonder why is that?

When using the step value, I can stop between two steps too... This is how I set up the slider:
Slider.MinimumValue = 0.0f; Slider.MaximumValue = 100.0f; Slider.ShowTextAboveThumbs = true; Slider.StepVAlue = 10.0f; Slider.StepValueContinuously = false;

Do you have any ideas what is causing these problems on iOS?

Thanks for your help!

@halkar
Copy link
Owner

halkar commented Dec 1, 2016

Thanks @CatherineSD, I'll investigate.

@halkar halkar added the bug label Dec 1, 2016
@ghost
Copy link
Author

ghost commented Dec 1, 2016

@halkar I just tested some more and for the "jittering", it seems that sometimes the movement is done correctly (smoothly without stopping), but I cannot do it on purpose. It is maybe a collider problem? Is it the lign or the thumb that catches the touch events?

@halkar
Copy link
Owner

halkar commented Dec 1, 2016

@CatherineSD touch is handled by the control itself and then it checks which thumb was touched.

@halkar
Copy link
Owner

halkar commented Dec 3, 2016

@CatherineSD, unfortunately, I can't reproduce the issue :( If you could share more information that would be helpful.

@ghost
Copy link
Author

ghost commented Dec 5, 2016

@halkar Thanks for your help. I will look into the problem again today myself. Would it helped if I send you a test project with the problem?

@ghost
Copy link
Author

ghost commented Dec 5, 2016

@halkar After many tests, I finally found the sources of the problem. For the step values, I had to simply replace Slider.StepValueContinuously = false; by Slider.StepValueContinuously = true; (maybe I didn't read the doc correctly for that one).

For the "jittering" problem, it is a bit more complex. It occurs because of another package I use in my project: Xamarin.SideBar (https://github.com/jdehlin/Xamarin-Sidebar). This package allows to add a sliding menu to the app. When I disable the menu, your slider is working fine, but when the menu is enabled (even when it is hidden), the slider is moving brokenly. I still don't know exactly what side effect from one or the other plugin is the cause. I will try to test some more.

@halkar halkar changed the title Trouble with step value on Xamarin.iOS [iOS] Trouble with step value on Xamarin.iOS Dec 9, 2016
@AbhishekHumagain
Copy link

AbhishekHumagain commented May 21, 2019

@halkar For the issue of "jittering" you can resolve it on iSO by adding this on your master detail page.
IsGestureEnable = "False"
this helps you to fix the issue of slider jittering.

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

No branches or pull requests

2 participants