55 lines
1.7 KiB
C
55 lines
1.7 KiB
C
|
|
//
|
||
|
|
// PYThemeButton.h
|
||
|
|
// Food
|
||
|
|
//
|
||
|
|
// Created by ko1o on 2019/7/16.
|
||
|
|
// Copyright © 2019年 ko1o. All rights reserved.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import <UIKit/UIKit.h>
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
|
||
|
|
@interface PYThemeButton : UIButton
|
||
|
|
|
||
|
|
@property (nonatomic, strong) UIImage *addedImage;
|
||
|
|
|
||
|
|
@property (nonatomic, copy) void(^action)(UIButton *button);
|
||
|
|
|
||
|
|
+ (instancetype)buttonWithTitle:(NSString *)title action:(void(^)(UIButton *button))action;
|
||
|
|
|
||
|
|
+ (instancetype)middleButtonWithTitle:(NSString *)title action:(void(^)(UIButton *button))action;
|
||
|
|
+ (instancetype)smallButtonWithTitle:(NSString *)title action:(void(^)(UIButton *button))action;
|
||
|
|
|
||
|
|
+ (instancetype)normalButtonWithTitle:(NSString *)title action:(void(^)(UIButton *button))action;
|
||
|
|
|
||
|
|
+ (instancetype)nextButtonWithAction:(void(^)(UIButton *button))action;
|
||
|
|
|
||
|
|
+ (instancetype)navItemWithImageName:(NSString *)imageName action:(void(^)(UIButton *button))action;
|
||
|
|
|
||
|
|
+ (instancetype)navItemWithTitle:(NSString *)title action:(void(^)(UIButton *button))action;
|
||
|
|
|
||
|
|
+ (instancetype)addImageButtonWithAction:(void(^)(UIButton *btn))didAddAction;
|
||
|
|
|
||
|
|
+ (instancetype)normalNavItemWithImageName:(NSString *)imageName action:(void(^)(UIButton *button))action;
|
||
|
|
|
||
|
|
- (void)btnLayerForColor:(UIColor*)forColor toColor:(UIColor*)toColor andWithCornerRadius:(float)cornerRadius;
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
@interface PYThemeTextField : UIView
|
||
|
|
|
||
|
|
@property (nonatomic, strong) UITextField *textField;
|
||
|
|
|
||
|
|
+ (instancetype)fieldWithPlaceholder:(NSString *)placeholder maxLength:(int)maxLength;
|
||
|
|
|
||
|
|
+ (instancetype)smallFieldWithPlaceholder:(NSString *)placeholder maxLength:(int)maxLength;
|
||
|
|
|
||
|
|
- (NSString *)text;
|
||
|
|
|
||
|
|
@property (nonatomic, strong) void(^textDidChangeAction)(PYThemeTextField *textFiled);
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_END
|