-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIRCustomIconButton.h
44 lines (33 loc) · 1.26 KB
/
IRCustomIconButton.h
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
//
// IRCustomIconButton.h
// IRPasscode
//
// Created by Phil on 2019/11/14.
// Copyright © 2019 Phil. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, IconContentMode) {
IconContentModeCenter = 0,
IconContentModeLeft,
IconContentModeRight
};
IB_DESIGNABLE
@interface IRCustomIconButton : UIButton
#if !TARGET_INTERFACE_BUILDER
@property (nonatomic, assign) IBInspectable UIViewContentMode imageViewContentMode;
#else
@property (nonatomic, assign) IBInspectable NSInteger imageViewContentMode;
#endif
@property (nonatomic, assign) IBInspectable NSInteger iconContentMode;
//@property (nonatomic, assign) IBInspectable XXX iconPosition;
@property (nonatomic, assign) IBInspectable CGSize iconSizePersent; // >0
@property (nonatomic, assign) IBInspectable CGFloat cornerRadius;
@property (nonatomic, assign) IBInspectable CGFloat borderWidth;
@property (nonatomic, strong) IBInspectable UIColor *borderColor;
@property (nonatomic, assign) IBInspectable CGFloat titleEdgeTop;
@property (nonatomic, assign) IBInspectable CGFloat titleEdgeLeft;
@property (nonatomic, assign) IBInspectable CGFloat titleEdgeBottom;
@property (nonatomic, assign) IBInspectable CGFloat titleEdgeRight;
@end
NS_ASSUME_NONNULL_END