Custom UISlider Image disappearing?

Posted by Silent on Stack Overflow See other posts from Stack Overflow or by Silent
Published on 2010-04-14T20:30:16Z Indexed on 2010/04/15 14:23 UTC
Read the original article Hit count: 804

Filed under:
|

Hello all i have a custom image to replace the UISLider defult button image, all works fine image shows, it does not clip off. The problem is when i use the slider to move up and down the image dissapears and some how doesnt show up anymore only sometimes. could someone have a fix?

CGRect rect = CGRectMake(16.0, 390.0, 297.0, 35.0);
slider.frame = rect;

UIImage* thumbImage = [UIImage imageNamed:@"thumb.png"];   
[slider setThumbImage:thumbImage forState:UIControlStateNormal];

UIImage* leftImage = [UIImage imageNamed:@"SliderLeft.png"];   
[slider setMinimumTrackImage:leftImage forState:UIControlStateNormal];   

UIImage* rightImage = [UIImage imageNamed:@"SliderRight.png"];
[slider setMaximumTrackImage:rightImage forState:UIControlStateNormal];

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c