From 3e8437ae559487362fae3525beb79c534c213a51 Mon Sep 17 00:00:00 2001 From: 单军华 Date: Thu, 12 Jul 2018 13:44:34 +0800 Subject: [PATCH] bug修复和功能优化 --- screendisplay/screendisplay/Classes/Category/UIButton+LMJ.h | 68 ++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/screendisplay/screendisplay/Classes/Category/UIButton+LMJ.h b/screendisplay/screendisplay/Classes/Category/UIButton+LMJ.h new file mode 100755 index 0000000..670c70e --- /dev/null +++ b/screendisplay/screendisplay/Classes/Category/UIButton+LMJ.h @@ -0,0 +1,68 @@ +// +// UIButton+LMJ.h +// iOSProject +// +// Created by windshan on 2017/12/28. +// Copyright �� 2017��� windshan. All rights reserved. +// + +#import <UIKit/UIKit.h> + +typedef void (^TouchedBlock)(NSInteger tag); + +@interface UIButton (LMJ) + +/** + ������ addtarget + */ +- (void)addActionHandler:(TouchedBlock)touchHandler; + +/** + * @brief ������������������������������ + * + * @param backgroundColor ������������ + * @param state ������������ + */ +- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state; + +/* + * @brief + * + * @param frame frame + * @param buttonTitle ������ + * @param normalBGColor ��������������������� + * @param selectBGColor ������������������ + * @param normalColor ��������������������� + * @param selectColor ������������������ + * @param buttonFont ������������ + * @param cornerRadius ��������� ������������0 + * @param doneBlock ������������ + * + * @return + */ +- (instancetype)initWithFrame:(CGRect)frame buttonTitle:(NSString *)buttonTitle normalBGColor:(UIColor *)normalBGColor selectBGColor:(UIColor *)selectBGColor + normalColor:(UIColor *)normalColor selectColor:(UIColor *)selectColor buttonFont:(UIFont *)buttonFont cornerRadius:(CGFloat )cornerRadius + doneBlock:(void(^)(UIButton *))doneBlock; + + ++ (UIButton *)initWithFrame:(CGRect)frame buttonTitle:(NSString *)buttonTitle normalBGColor:(UIColor *)normalBGColor selectBGColor:(UIColor *)selectBGColor + normalColor:(UIColor *)normalColor selectColor:(UIColor *)selectColor buttonFont:(UIFont *)buttonFont cornerRadius:(CGFloat )cornerRadius + doneBlock:(void(^)(UIButton *))doneBlock; + +@end + + +// +// Created by Alberto Pasca on 27/02/14. +// Copyright (c) 2014 albertopasca.it. All rights reserved. +// + +#import <UIKit/UIKit.h> + +IB_DESIGNABLE +@interface APRoundedButton : UIButton + +@property (nonatomic, assign) IBInspectable NSUInteger style; +@property (nonatomic, assign) IBInspectable CGFloat nj_cornerRaduous; + +@end -- Gitblit v1.8.0