//
//  RDSlider.m
//  Temperature
//
//  Created by RD on 2022/12/30.
//

#import "RDSlider.h"

@implementation RDSlider

// 改变slider滑道的高度
- (CGRect)trackRectForBounds:(CGRect)bounds {
    CGRect rect = bounds;
    rect.size.height = 10;
    rect.origin.y = (self.frame.size.height - rect.size.height) / 2;
    return rect;
}

- (CGRect)thumbRectForBounds:(CGRect)bounds trackRect:(CGRect)rect value:(float)value {
    CGRect tempRect = rect;
    tempRect.origin.x = rect.origin.x - 40;
    tempRect.size.width = rect.size.width + 80;
    return CGRectInset([super thumbRectForBounds:bounds trackRect:tempRect value:value], 40, 40);
}

@end
