summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/ThreadViewController.m
blob: 893765b2eee68fd4dbc4ed2e638df2c51c2c6877 (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
//
//  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"

@interface ThreadViewController ()

@property (nonatomic, readwrite, retain) UIView *inputAccessoryView;

@end

@implementation ThreadViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}


- (BOOL) canBecomeFirstResponder {
    return YES;
}

- (UIView *)inputAccessoryView {
    if (!_inputAccessoryView) {
        CGRect viewBounds = self.view.bounds;
        CGRect frame = CGRectMake(0, viewBounds.size.height - PHFComposeBarViewInitialHeight, viewBounds.size.width,
                                  PHFComposeBarViewInitialHeight);
        PHFComposeBarView *_view = [[PHFComposeBarView alloc] initWithFrame:frame];
        _view.backgroundColor = [UIColor whiteColor];
        _view.buttonTintColor = [ColorScheme linkColor];
        _view.maxLinesCount = 4;
        _view.utilityButtonImage = [UIImage imageNamed:@"Camera"];
        _view.delegate = self;
        _inputAccessoryView = _view;
    }
    return _inputAccessoryView;
}

@end