Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UISlider frame error on ios7

UISlider frame min width is 22, min height is 34.
Even if i set frame CGRectMake(0,0,1,1) it cannot change correctly.

UISlider *slider = [[UISlider alloc] init];
slider.frame = CGRectMake(0,0,1,1)
like image 609
Sean Avatar asked May 28 '26 14:05

Sean


1 Answers

I think, that Apple make 34 as minimum size of UISlider. Not 42, but 34

Try code:

UISlider *slider = [[UISlider alloc] init];
slider.frame = CGRectMake(0,0,36,36)
like image 146
gaussblurinc Avatar answered Jun 02 '26 04:06

gaussblurinc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!