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. Xcode Version 3.2.5.
@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
Problem Solved!!!
The simulator is NOT case sensitive. The Device is case sensitive. I've changed and make sure all my filenames are exactly the same with Case Sensitive.
e.g. Chalkline
should be ChalkLine
Are you copying the resource files over (did you choose to make a copy of the images when you added them)? Try a Clean from the Build (or Run?) menu...and Build & Run again.
精彩评论