BBAEnlargeHitRectButton.h
963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// 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