https://github.com/irons163/ircustomiconbutton
Convenient Icon Button for iOS.
https://github.com/irons163/ircustomiconbutton
custombutton ios objcective-c
Last synced: 11 months ago
JSON representation
Convenient Icon Button for iOS.
- Host: GitHub
- URL: https://github.com/irons163/ircustomiconbutton
- Owner: irons163
- License: mit
- Created: 2019-11-14T08:41:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-14T08:55:51.000Z (over 6 years ago)
- Last Synced: 2025-01-17T05:24:13.477Z (about 1 year ago)
- Topics: custombutton, ios, objcective-c
- Language: Objective-C
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IRCustomIconButton
## Install
### Git
- Git clone this project.
- Copy this project into your own project.
### Donwload
- Download `IRCustomIconButton.h` and `IRCustomIconButton.m`.
- Copy these two files into your own project.
## Usage
@property (nonatomic, assign) IBInspectable UIViewContentMode imageViewContentMode;
- Set UIViewContentMode to the imageView of button.
@property (nonatomic, assign) IBInspectable NSInteger iconContentMode;
- Set iconContentMode to button.
```objc
typedef NS_ENUM(NSInteger, IconContentMode) {
IconContentModeCenter = 0,
IconContentModeLeft,
IconContentModeRight
};
```
@property (nonatomic, assign) IBInspectable CGSize iconSizePersent; // >0
- Set iconSizePersent to button.
@property (nonatomic, assign) IBInspectable CGFloat cornerRadius;
- Set cornerRadius to button.
@property (nonatomic, assign) IBInspectable CGFloat borderWidth;
- Set borderWidth to the border of button.
@property (nonatomic, strong) IBInspectable UIColor *borderColor;
- Set UIColor to the border of button.
@property (nonatomic, assign) IBInspectable CGFloat titleEdgeTop;
@property (nonatomic, assign) IBInspectable CGFloat titleEdgeLeft;
@property (nonatomic, assign) IBInspectable CGFloat titleEdgeBottom;
@property (nonatomic, assign) IBInspectable CGFloat titleEdgeRight;
- Set titleEdge to button.