forked from favormm/ChatInputSample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTHChatInput.h
More file actions
47 lines (40 loc) · 1.56 KB
/
THChatInput.h
File metadata and controls
47 lines (40 loc) · 1.56 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
//
// Created by Marat Alekperov (aka Timur Harleev) (m.alekperov@gmail.com) on 18.11.12.
// Copyright (c) 2012 Me and Myself. All rights reserved.
//
#import <UIKit/UIKit.h>
@class THChatInput;
@protocol THChatInputDelegate <UITextViewDelegate>
- (void)chat:(THChatInput*)input sendWasPressed:(NSString*)text;
@optional
- (void)chatShowAttachInput:(THChatInput*)cinput;
- (void)chatShowEmojiInput:(THChatInput*)cinput;
- (void)chatUpdatedKeyboardProperties:(THChatInput*)cinput;
- (void)chatKeyboardWillShow:(THChatInput*)cinput;
- (void)chatKeyboardDidShow:(THChatInput*)cinput;
- (void)chatKeyboardWillHide:(THChatInput*)cinput;
- (void)chatKeyboardDidHide:(THChatInput*)cinput;
@end
@interface THChatInput : UIView <UITextViewDelegate>
{
CGFloat topGap;
CGFloat keyboardAnimationDuration;
UIViewAnimationCurve keyboardAnimationCurve;
CGFloat keyboardHeight;
int inputHeight;
int inputHeightWithShadow;
BOOL autoResizeOnKeyboardVisibilityChanged;
}
@property (weak) IBOutlet id<THChatInputDelegate> delegate;
@property (strong, nonatomic) UIButton* sendButton;
@property (strong, nonatomic) UIButton* attachButton;
@property (strong, nonatomic) UIButton* emojiButton;
@property (strong, nonatomic) UITextView* textView;
@property (strong, nonatomic) UILabel* lblPlaceholder;
@property (strong, nonatomic) UIImageView* inputBackgroundView;
@property (strong, nonatomic) UITextField *textViewBackgroundView;
@property (readwrite, nonatomic) CGFloat keyboardHeight;
- (NSString*)text;
- (void)setText:(NSString*)text;
- (void)setPlaceholder:(NSString*)text;
@end