26 lines
875 B
Objective-C
26 lines
875 B
Objective-C
//
|
|
// UIButton+button.h
|
|
// TTJF
|
|
//
|
|
// Created by wbzhan on 2018/4/24.
|
|
// Copyright © 2018年 TTJF. All rights reserved.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
typedef NS_ENUM(NSInteger, ImagePosition) {
|
|
ImagePositionLeft = 0, // 图片在左,文字在右,默认
|
|
ImagePositionRight, // 图片在右,文字在左
|
|
ImagePositionTop, // 图片在上,文字在下
|
|
ImagePositionBottom, // 图片在下,文字在上
|
|
};
|
|
#define defaultInterval 0.01//默认时间间隔
|
|
@interface UIButton (button)
|
|
/**
|
|
* 为按钮添加点击间隔 eventTimeInterval秒
|
|
*/
|
|
@property(nonatomic, assign) UIEdgeInsets hitTestEdgeInsets;//响应范围负值为扩大,正值为缩小
|
|
@property (nonatomic, assign) NSTimeInterval timeInterval;
|
|
- (void)setImagePosition:(ImagePosition)postion spacing:(CGFloat)spacing;//设置图片与文字具体位置与间距
|
|
|
|
@end
|