- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent*)event
{
CGRectbounds =self.bounds;
CGFloatwidthDelta =44.0- bounds.size.width;
CGFloatheightDelta =44.0- bounds.size.height;
bounds =CGRectInset(bounds, -0.5* widthDelta, -0.5* heightDelta);//注意这里是负数,扩大了之前的bounds的范围
returnCGRectContainsPoint(bounds, point);
}
iOS扩大按钮UIButton的点击范围
最新推荐文章于 2020-11-02 08:38:09 发布