Search This Blog

Friday, February 4, 2011

Custom images with UISlider doesn't show on the device.

Programmer Question

Everything works on the simulator without a problem. However when I put it on my device it only show the ThumbImage. It is just really strange. I'm thinking this could be a iOS version issue or memory issue. My device is iPhone 3GS iOS 4.1.



@interface BlueChalkSlider : UISlider {}
@end

@implementation BlueChalkSlider
- (id)initWithCoder:(NSCoder *)decoder {
if ((self = [super initWithCoder: decoder])) {
self.backgroundColor = [UIColor clearColor];
[self setThumbImage:[UIImage imageNamed:@"Chalk.png"] forState:UIControlStateNormal];
[self setMinimumTrackImage:[UIImage imageNamed:@"ChalklineBlue.png"] forState:UIControlStateNormal];
[self setMaximumTrackImage:[UIImage imageNamed:@"ChalklineWhite.png"] forState:UIControlStateNormal];
}
return self;
}
@end


Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails