JLChen
2021-05-18 a869383e163a18cdedcf587383c1eca043129754
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
//  Copyright © 2016 dahua. All rights reserved.
//
 
#import <UIKit/UIKit.h>
 
@interface UIButton(LeChange)
 
//用状态图片初始化按钮 按钮大小与图片相等
+ (UIButton *)lc_buttomWithNormalImageName:(NSString *)normalImageName
                          disableImageName:(NSString *)disableImageName
                            hightImageName:(NSString *)hightImageName;
 
+ (UIButton *)lc_buttomWithNormalImage:(UIImage *)normalImage
                          disableImage:(UIImage *)disableImage
                            hightImage:(UIImage *)image;
 
//用图片初始化按钮 按钮大小与图片相等
+ (UIButton *)lc_buttonWithImage:(UIImage *)image;
 
+ (UIButton *)lc_buttonWithImageName:(NSString *)imageName;
 
 
/**
 改变button
 
 @param title 标题
 @param imageName 图片
 @param target 执行目标
 @param action 函数
 */
- (void)lc_changeStyleWithTitle:(NSString *)title image:(NSString *)imageName target:(id)target action:(SEL)action;
 
/**
 改变按钮
 
 @param title 标题
 @param textColor 文字颜色
 @param target 执行目标
 @param action 函数
 */
- (void)lc_changeStyleWithTitle:(NSString *)title textColor:(UIColor*)textColor target:(id)target action:(SEL)action;
 
/**
 * 设置带有图片在上文字在下的按钮
 */
- (void)setUIButtonImageUpWithTitleDownUI;
 
/// 设置带有图片在上文字在下的按钮
/// @param space 文字与图片间距
- (void)setUIButtonImageUpWithTitleDownUIWithSpace:(CGFloat)space;
 
/**
 *  图片在右、文字在左
 */
- (void)setUIButtonImageRightWithTitleLeftUI;
 
/**
 *  图片在左、文字在右
 */
- (void)setUIButtonImageLeftWithTitleRightUI;
 
/**
 *  重制按钮偏移量
 */
- (void)resetEdgInset;
 
@end