File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -393,14 +393,11 @@ -(void)layoutSubviews
393
393
// TODO: Do it the correct way. I think wwdc 2012 had a video on it...
394
394
- (CGRect) touchRectForHandle : (UIImageView*) handleImageView
395
395
{
396
- float xPadding = 10 ;
397
- float yPadding = 10 ; // (self.bounds.size.height-touchRect.size.height)/2.0f
398
-
399
- CGRect touchRect = handleImageView.frame ;
400
- touchRect.origin .x -= xPadding/2.0 ;
401
- touchRect.origin .y -= yPadding/2.0 ;
402
- touchRect.size .height += xPadding;
403
- touchRect.size .width += yPadding;
396
+ float xPadding = 5 ;
397
+ float yPadding = 5 ; // (self.bounds.size.height-touchRect.size.height)/2.0f
398
+
399
+ // expands rect by xPadding in both x-directions, and by yPadding in both y-directions
400
+ CGRect touchRect = CGRectInset (handleImageView.frame , -xPadding, -yPadding);;
404
401
return touchRect;
405
402
}
406
403
You can’t perform that action at this time.
0 commit comments