-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathUIMessageInputView.h
executable file
·56 lines (48 loc) · 2.03 KB
/
UIMessageInputView.h
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
//
// UIMessageInputView.h
// Coding_iOS
//
// Created by 王 原闯 on 14-9-11.
// Copyright (c) 2014年 Coding. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AGEmojiKeyBoardView.h"
#import "Projects.h"
typedef NS_ENUM(NSInteger, UIMessageInputViewContentType) {
UIMessageInputViewContentTypeTweet = 0,
UIMessageInputViewContentTypePriMsg,
UIMessageInputViewContentTypeTopic,
UIMessageInputViewContentTypeTask
};
typedef NS_ENUM(NSInteger, UIMessageInputViewState) {
UIMessageInputViewStateSystem,
UIMessageInputViewStateEmotion,
UIMessageInputViewStateAdd,
UIMessageInputViewStateVoice
};
@protocol UIMessageInputViewDelegate;
@interface UIMessageInputView : UIView<UITextViewDelegate>
@property (strong, nonatomic) NSString *placeHolder;
@property (assign, nonatomic) BOOL isAlwaysShow;
@property (assign, nonatomic, readonly) UIMessageInputViewContentType contentType;
@property (strong, nonatomic) User *toUser;
@property (strong, nonatomic) NSNumber *commentOfId;
@property (strong, nonatomic) Project *curProject;
@property (nonatomic, weak) id<UIMessageInputViewDelegate> delegate;
+ (instancetype)messageInputViewWithType:(UIMessageInputViewContentType)type;
+ (instancetype)messageInputViewWithType:(UIMessageInputViewContentType)type placeHolder:(NSString *)placeHolder;
- (void)prepareToShow;
- (void)prepareToDismiss;
- (BOOL)notAndBecomeFirstResponder;
- (BOOL)isAndResignFirstResponder;
- (BOOL)isCustomFirstResponder;
- (CGFloat)heightWithSafeArea;
@end
@protocol UIMessageInputViewDelegate <NSObject>
@optional
- (void)messageInputView:(UIMessageInputView *)inputView sendText:(NSString *)text;
- (void)messageInputView:(UIMessageInputView *)inputView sendBigEmotion:(NSString *)emotionName;
- (void)messageInputView:(UIMessageInputView *)inputView sendVoice:(NSString *)file duration:(NSTimeInterval)duration;
- (void)messageInputView:(UIMessageInputView *)inputView addIndexClicked:(NSInteger)index;
- (void)messageInputView:(UIMessageInputView *)inputView heightToBottomChenged:(CGFloat)heightToBottom;
@end