===================================
Extension of UIButton
to control its touch area.
Use CocoaPods.
pod 'UIButton+SBAInspectableHitExtension'
Create UIButton
, then set hitTestEdgeInsets
.
UIButton *button = [[UIButton alloc] init];
button.hitTestEdgeInsets = UIEdgeInsetsMake(-10.0f, 10.0f, -10.0f, -10.0f);
Create UIButton
, using interface builder and set it's topTouch
,leftTouch
, bottomTouch
and rightTouch
.
Congratulations! You're done.
UIButton-InspectableHitExtension is under MIT. See LICENSE file for more info.