blob: 4de0cababcad72921ebb65b3be416aed24673f3d (
plain) (
blame)
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
|
//
// ThreadViewController.m
// Juick
//
// Created by Vitaly Takmazov on 24/09/2017.
// Copyright © 2017 com.juick. All rights reserved.
//
#import "ThreadViewController.h"
#import "ColorScheme.h"
#import "MessageCell.h"
@import PHFComposeBarView;
@interface ThreadViewController ()
@property (nonatomic, readwrite, retain) UIView *inputAccessoryView;
-(void) updateQuoteText:(Message *)message;
@end
@implementation ThreadViewController
- (void)viewDidLoad {
[super viewDidLoad];
}
- (BOOL) canBecomeFirstResponder {
return YES;
}
- (UIView *)inputAccessoryView {
if (!_inputAccessoryView) {
CGRect viewBounds = self.view.bounds;
CGRect frame = CGRectMake(0, viewBounds.size.height - PHFComposeBarViewInitialHeight - self.view.safeAreaInsets.top + self.view.safeAreaInsets.bottom, viewBounds.size.width, PHFComposeBarViewInitialHeight);
PHFComposeBarView *inputView = [[PHFComposeBarView alloc] initWithFrame:frame];
inputView.backgroundColor = [UIColor whiteColor];
inputView.buttonTintColor = [ColorScheme linkColor];
inputView.maxLinesCount = 4;
inputView.utilityButtonImage = [UIImage imageNamed:@"Camera"];
inputView.delegate = self;
_inputAccessoryView = inputView;
}
return _inputAccessoryView;
}
-(void) updateQuoteText:(Message *)message {
/*MessageInputView *inputView = (MessageInputView *)self.inputAccessoryView;
inputView.quoteText.text = message.text;*/
}
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
Message * selectedMessage = [self.messages objectAtIndex:indexPath.row];
[self updateQuoteText:selectedMessage];
}
@end
|