【发布时间】:2011-02-05 02:06:32
【问题描述】:
一切都在模拟器上运行没有问题。但是,当我把它放在我的设备上时,它只显示ThumbImage。这真的很奇怪。我认为这可能是 iOS 版本问题或内存问题。我的设备是 iPhone 3GS iOS 4.1。 Xcode 版本 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
【问题讨论】:
标签: ios custom-controls uiimage uislider