我将UISlider子类化以使拇指变小,并且我想覆盖minimumValueImageRectForBounds和maximumValueImageRectForBounds以使其宽度减少2px。所以我的代码是-(CGRect)minimumValueImageRectForBounds:(CGRect)bounds{CGRectstdRect=[superminimumValueImageRectForBounds:bounds];returnCGRectMake(stdRect.origin.x+2,stdRect.origin.y,stdRect.size.width-2,std