新建一个文件继承自UISLider 然后在这里面重写UISlider的这个方法
@implementation LianUISlider
(instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {}
return self;
}(CGRect)thumbRectForBounds:(CGRect)bounds trackRect:(CGRect)rect value:(float)value{
rect.origin.x = rect.origin.x - 10 ;
rect.size.width = rect.size.width +20;
return CGRectInset ([super thumbRectForBounds:bounds trackRect:rect value:value], 10 , 10);
}
@end