Skip to content

Commit 9e4ccfa

Browse files
committed
Update README.md
1 parent 25fa44a commit 9e4ccfa

1 file changed

Lines changed: 22 additions & 12 deletions

File tree

README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ImageCenterButton is a subclass of UIButton. Use it you can make a button with i
1414
* Image padding customization
1515
* Round image support
1616
* Dynamic button backgroundColor customization
17+
* IB_DESIGNABLE and IBInspectable added(Andrey Yastrebov ^_^)
1718

1819
## CocoaPods
1920
To use ImageCenterButton add the following to your Podfile
@@ -23,17 +24,21 @@ To use ImageCenterButton add the following to your Podfile
2324
## Usage
2425
```objective-c
2526
// Round Image
26-
@property BOOL imageIsRound;
27+
@property(nonatomic) IBInspectable BOOL imageIsRound;
2728
// Image Padding
28-
@property CGFloat padding;
29+
@property(nonatomic) IBInspectable CGFloat padding;
2930
// Spacing between imageview and textlabel
30-
@property CGFloat imageTextSpace;
31+
@property(nonatomic) IBInspectable CGFloat imageTextSpace;
3132
// Maximum imageview size
32-
@property CGSize imageViewMaxSize;
33+
@property(nonatomic) IBInspectable CGSize imageViewMaxSize;
3334
// Button backgroundHighlighted
34-
@property(nonatomic, strong) UIColor *backgroundHighlightedColor;
35+
@property(nonatomic, strong) IBInspectable UIColor *backgroundHighlightedColor;
3536
// Button backgroundNormal
36-
@property(nonatomic, strong) UIColor *backgroundNormalColor;
37+
@property(nonatomic, strong) IBInspectable UIColor *backgroundNormalColor;
38+
// Border width
39+
@property(nonatomic) IBInspectable CGFloat borderWidth;
40+
// Border Color
41+
@property(nonatomic, strong) IBInspectable UIColor *borderColor;
3742
```
3843

3944
## License
@@ -55,21 +60,26 @@ ImageCenterButton 是UIButton的子类。可以用它很方便的生成图像在
5560
* 图像padding可定制
5661
* 支持生成圆形图像
5762
* 按钮不同状态背景色可定制
63+
* 添加IB_DESIGNABLE IBInspectable 支持(感谢Andrey Yastrebov的支持)
5864

5965
## ImageCenterButton 使用配置
6066
```objective-c
6167
// 是否将图像设置成圆形
62-
@property BOOL imageIsRound;
68+
@property(nonatomic) IBInspectable BOOL imageIsRound;
6369
// 图像padding设置
64-
@property CGFloat padding;
70+
@property(nonatomic) IBInspectable CGFloat padding;
6571
// imageview和textlabel间距设置
66-
@property CGFloat imageTextSpace;
72+
@property(nonatomic) IBInspectable CGFloat imageTextSpace;
6773
// imageview最大尺寸设置
68-
@property CGSize imageViewMaxSize;
74+
@property(nonatomic) IBInspectable CGSize imageViewMaxSize;
6975
// Button高亮状态背景色设置
70-
@property(nonatomic, strong) UIColor *backgroundHighlightedColor;
76+
@property(nonatomic, strong) IBInspectable UIColor *backgroundHighlightedColor;
7177
// Button普通状态背景色设置
72-
@property(nonatomic, strong) UIColor *backgroundNormalColor;
78+
@property(nonatomic, strong) IBInspectable UIColor *backgroundNormalColor;
79+
// 边框宽度设置
80+
@property(nonatomic) IBInspectable CGFloat borderWidth;
81+
// 边框颜色设置
82+
@property(nonatomic, strong) IBInspectable UIColor *borderColor;
7383
```
7484

7585
## CocoaPods 支持

0 commit comments

Comments
 (0)