BBAEnlargeHitRectButton.h 963 Bytes
//
//  BBAEnlargeHitRectButton.h
//  BBAUIKit
//
//  Created by Zhu,Yusong on 2019/7/4.
//  Copyright © 2019 Baidu. All rights reserved.
//

#import <UIKit/UIKit.h>

/**
 *    扩大按钮的点选区域
 */

@interface BBAEnlargeHitRectButton : UIButton

/*!
 @method setEnlargeEdge:
 @abstract 扩大按钮 上|下|左|右 可点击区域
 @param  inset 上|下|左|右 扩大值
 */
- (void)setEnlargeEdge:(CGFloat)inset;

/*!
 @method setEnlargeEdge:
 @abstract 扩大按钮 上|下|左|右 可点击区域
 @param  top  上边缘向外扩大值
 @param  left 左边缘向外扩大值
 @param  bottom 下边缘向外扩大值
 @param  right 右边缘向外扩大值
 */
- (void)setEnlargeEdgeWithTop:(CGFloat) top left:(CGFloat) left bottom:(CGFloat) bottom right:(CGFloat) right;

/**
 返回当前按钮可以响应的热区大小
 
 @return 如果按钮已经设置了热区,返回热区,没有设置则返回原值
 */
- (CGRect)enlargedRect;

@end