| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- //
- // FDTool.h
- // timePicker
- //
- // Created by xuansa on 2017/1/10.
- // Copyright © 2017年 xuansa. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- NS_ASSUME_NONNULL_BEGIN
- @interface FDTool : UIView
- /** 1.标题,default is nil */
- @property(nullable, nonatomic,copy) NSString *title;
- /** 2.字体,default is nil (system font 17 plain) */
- @property(null_resettable, nonatomic,strong) UIFont *font;
- /** 3.字体颜色,default is nil (text draws black) */
- @property(null_resettable, nonatomic,strong) UIColor *labelTitleColor;
- @property(null_resettable, nonatomic,strong) UIColor *buttonTitleColor;
- /** 4.按钮边框颜色颜色,default is RGB(205, 205, 205) */
- @property(null_resettable, nonatomic,strong) UIColor *borderButtonColor;
- @property(null_resettable, nonatomic,strong) UIColor *buttonBackgroundColor;
- /**
- * 1.初始化方法
- *
- * @param title <#title description#>
- * @param cancelButtonTitle <#cancelButtonTitle description#>
- * @param okButtonTitle <#okButtonTitle description#>
- * @param target <#target description#>
- * @param cancelAction <#cancelAction description#>
- * @param okAction <#okAction description#>
- *
- * @return <#return value description#>
- */
- - (instancetype)initWithTitle:(nullable NSString *)title
- cancelButtonTitle:(nullable NSString *)cancelButtonTitle
- okButtonTitle:(nullable NSString *)okButtonTitle
- addTarget:(nullable id)target
- cancelAction:(SEL)cancelAction
- okAction:(SEL)okAction;
- @end
- NS_ASSUME_NONNULL_END
- @interface UIView (FD)
- /**
- * 1.间隔X值
- */
- @property (nonatomic, assign) CGFloat x;
- /**
- * 2.间隔Y值
- */
- @property (nonatomic, assign) CGFloat y;
- /**
- * 3.宽度
- */
- @property (nonatomic, assign) CGFloat width;
- /**
- * 4.高度
- */
- @property (nonatomic, assign) CGFloat height;
- /**
- * 5.中心点X值
- */
- @property (nonatomic, assign) CGFloat centerX;
- /**
- * 6.中心点Y值
- */
- @property (nonatomic, assign) CGFloat centerY;
- /**
- * 7.尺寸大小
- */
- @property (nonatomic, assign) CGSize size;
- /**
- * 8.起始点
- */
- @property (nonatomic, assign) CGPoint origin;
- /**
- * 9.上 < Shortcut for frame.origin.y
- */
- @property (nonatomic) CGFloat top;
- /**
- * 10.下 < Shortcut for frame.origin.y + frame.size.height
- */
- @property (nonatomic) CGFloat bottom;
- /**
- * 11.左 < Shortcut for frame.origin.x.
- */
- @property (nonatomic) CGFloat left;
- /**
- * 12.右 < Shortcut for frame.origin.x + frame.size.width
- */
- @property (nonatomic) CGFloat right;
- /**
- * 1.添加边框
- *
- * @param color <#color description#>
- */
- - (void)addBorderColor:(nullable UIColor *)color;
- /**
- * 2.UIView 的点击事件
- *
- * @param target 目标
- * @param action 事件
- */
- - (void)addTarget:(nullable id)target
- action:(nullable SEL)action;
- @end
|