12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- //
- // TDButton.h
- // TheoryNetwork
- //
- // Created by tederen on 2019/9/20.
- // Copyright © 2019 tederen. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- typedef NS_ENUM(NSUInteger, GLButtonEdgeInsetsStyle) {
- /// image在上,label在下
- GLButtonEdgeInsetsStyleTop,
- /// image在左,label在右
- GLButtonEdgeInsetsStyleLeft,
- /// image在下,label在上
- GLButtonEdgeInsetsStyleBottom,
- /// image在右,label在左
- GLButtonEdgeInsetsStyleRight
- };
- NS_ASSUME_NONNULL_BEGIN
- @interface TDButton : UIButton
- /** 设置button的响应区域 **/
- - (void)setCurrentButtonHotSize:(CGSize)size;
- /** 图文排列。必须先确定bounds **/
- - (void)verticalImageAndTitle:(CGFloat)spacing;
- - (void)setButtonAlpha:(CGFloat)alpha;
- - (void)setButtonBadge:(NSInteger)num;
- - (void)setButtonBadge:(NSInteger)num isSelect:(BOOL)isSelect;
- /**
- * 设置button的titleLabel和imageView的布局样式,及间距
- *
- * @param style titleLabel和imageView的布局样式
- * @param space titleLabel和imageView的间距
- */
- - (void)layoutButtonWithEdgeInsetsStyle:(GLButtonEdgeInsetsStyle)style
- imageTitleSpace:(CGFloat)space;
- @end
- NS_ASSUME_NONNULL_END
|