Custom UI slider , Thumb image size issue

14,318

If you want change UISlider appearance then use below method
[[UISlider appearance] setThumbImage:[UIImage imageNamed:@"slider.png"] forState:UIControlStateNormal];

Share:
14,318
Prateek sharma
Author by

Prateek sharma

Updated on June 27, 2022

Comments

  • Prateek sharma
    Prateek sharma almost 2 years

    As I'm making a custom slider , Every thing is working fine . As I have an thumb image having width and height of 30x70. But when i implement the image it change its orientation by itself and displaying in 70x30 .

    I tried changing the image also but the Thumb slider comes in 70x30. I want to show image in vertical but it displays in horizontal in UISlider .

    Can any one help?

     [self setThumbImage:[UIImage imageNamed:@"slider.png"] forState:UIControlStateNormal];