@interface UINoBgSlider : UISlider
{
}
@end
@implementation UINoBgSlider
// implementation this method to not draw the slider track
- (CGRect)trackRectForBounds:(CGRect)bounds
{
return CGRectZero;
}
// implementation this method to handle the slider thumb control position
- (CGRect)thumbRectForBounds:(CGRect)bounds trackRect:(CGRect)rect value:(float)value
{
return CGRectMake(x, y, width, height);
}
@end
{
}
@end
@implementation UINoBgSlider
// implementation this method to not draw the slider track
- (CGRect)trackRectForBounds:(CGRect)bounds
{
return CGRectZero;
}
// implementation this method to handle the slider thumb control position
- (CGRect)thumbRectForBounds:(CGRect)bounds trackRect:(CGRect)rect value:(float)value
{
return CGRectMake(x, y, width, height);
}
@end
沒有留言:
張貼留言