I need to create my own slider. I am trying to change the thumb image, the background of the slider and in some kind of test, for example slide, to unlock. I tried like this, but its not working
CGRect frame = CGRectMake(0.0, 219.0, 323.0, 20.0); UISlider *myslider = [[UISlider alloc] initWithFrame:frame]; [myslider addTarget:self action:@selector(sliderAction:) forControlEvents:UIControlEventValueChanged]; [myslider setBackgroundColor:[UIColor clearColor]]; [myslider setThumbImage: [UIImage imageNamed:@" sliderThumb@2x.png "] forState:UIControlStateNormal]; myslider.minimumValue = 0.0; myslider.maximumValue = 50.0; myslider.continuous = YES; myslider.value = 15.0; [self.view addSubview:myslider];
But in this, the large pic size is very large. How to reduce thumb size ... and how to give slider background and text. Please help me
Nik's
source share