//
//  BFUIButton.swift
//  Alamofire
//
//  Created by ak on 2021/8/4.
//  功能：默认扩大 btn 的点击范围

import Foundation

public class BFUIButton: UIButton {
    //扩大点击范围 PX
    var margin: CGFloat = 60
    public override func point(inside point: CGPoint, with _: UIEvent?) -> Bool {
        let area = bounds.insetBy(dx: -margin, dy: -margin) // 负值是方法响应范围
        return area.contains(point)
    }
}
