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 is too small makes a bug。 #88

Open
AbnerPei opened this issue Nov 19, 2018 · 1 comment
Open

Value is too small makes a bug。 #88

AbnerPei opened this issue Nov 19, 2018 · 1 comment

Comments

@AbnerPei
Copy link

Good

    //standard rsnge slider
    self.rangeSlider.minValue = 10;
    self.rangeSlider.maxValue = 50;
    self.rangeSlider.selectedMaximum = 40;
    self.rangeSlider.disableRange = YES;
    [self.rangeSlider addTarget:self action:@selector(logControlEvent:) forControlEvents:UIControlEventValueChanged];

bug

    //standard rsnge slider
    self.rangeSlider.minValue = 1;
    self.rangeSlider.maxValue = 5;
    self.rangeSlider.selectedMaximum = 4;
    self.rangeSlider.disableRange = YES;
    [self.rangeSlider addTarget:self action:@selector(logControlEvent:) forControlEvents:UIControlEventValueChanged];

You can run your demo,and change value "10" to "1","50" to "5" and so on .sliderLayer's frame is not center. 【I come from China, my English is not good, I hope you know what I mean】

@AbnerPei AbnerPei changed the title Value is too later makes a bug。 Value is too small makes a bug。 Nov 19, 2018
@redcapua
Copy link
Contributor

redcapua commented Dec 4, 2018

@chinesemanbobo

Hi!

In your particular case you have to set
self.rangeSlider.selectedMinimum = 5;

because selectedMinimum is 10 by default.

As a solution selectedMinimum have to be set lower than maxValue.

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