//
|
// HDLOPPButton.m
|
// HDLOnProIpad
|
//
|
// Created by 陈启扬 on 2022/8/16.
|
//
|
|
#import "HDLEZButton.h"
|
|
@implementation HDLEZButton
|
|
|
|
-(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent*)event
|
{
|
CGRect bounds = self.bounds;
|
//扩大原热区直径至26,可以暴露个接口,用来设置需要扩大的半径。
|
CGFloat widthDelta = MAX(self.tapWidth, 0);
|
CGFloat heightDelta = MAX(self.tapHeight, 0);
|
bounds = CGRectInset(bounds, -0.5 * widthDelta, -0.5 * heightDelta);
|
return CGRectContainsPoint(bounds, point);
|
}
|
|
@end
|