BBAToolBarInputView.h
1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// BBAToolBarInputView.h
// BBAPods
//
// Created by liaoxuejun on 16/9/1.
// Copyright © 2016年 Baidu. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, BBAToolBarInputViewType) {
BBAToolBarInputViewTypeSimple, //非图集使用
BBAToolBarInputViewTypeDarkLight, //图集使用
BBAToolBarInputViewTypeLight, //小视频使用
};
///动画类型
typedef NS_ENUM(NSInteger, BBAToolBarInputViewPlaceholderAnimationType) {
///无动画
BBAToolBarInputViewPlaceholderAnimationTypeNone = 0,
///打字效果动画
BBAToolBarInputViewPlaceholderAnimationTypeTyping,
};
typedef void(^BBAToolBarInputViewEmotionBlock)(void);
/// toolbar上输入框默认高度
extern const CGFloat kBBAToolBarInputViewHeight;
@interface BBAToolBarInputView : UIButton
@property (nonatomic, assign) BBAToolBarInputViewType toolBarInputViewType;
@property (nonatomic, assign) BBAToolBarInputViewPlaceholderAnimationType animationType;
@property (nonatomic, assign, getter = isShowEmotion) BOOL showEmotion;
@property (nonatomic, copy) BBAToolBarInputViewEmotionBlock emotionBlock;
- (instancetype)initWithFrame:(CGRect)frame placeholder:(NSString *)text style:(BBAToolBarInputViewType)style;
- (instancetype)initWithFrame:(CGRect)frame placeholder:(NSString *)text;
- (instancetype)initWithFrame:(CGRect)frame;
- (void)setPromptText:(NSAttributedString *)attributes;
- (void)setCommentDraft:(NSString *)draftStr;
- (NSString *)getCommentDraft;
- (void)setDefaultText;
//按照默认样式重置placeholder
- (void)setPlaceholderWithDefaultStyle:(NSString *)text;
- (void)startPlaceHolderAnimaiotn;
/**
关闭评论,评论输入框置灰,不可点击
*/
- (void)enableInputView;
/**
关闭评论,评论输入框可点击
*/
- (void)disableInpuView;
@end