summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/MessagesViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-06-28 22:36:47 +0300
committerGravatar Vitaly Takmazov2017-06-28 22:36:47 +0300
commit25bc4f1357252dc0aeee70f0a638a4226231d5fb (patch)
treea52e336644a7da57d6c61742c0a04ad5baeeaabf /Juick/ViewControllers/MessagesViewController.m
parent3cdb6da2f5eb360ff584385901e4801462493bb0 (diff)
inputAccessoryView
Diffstat (limited to 'Juick/ViewControllers/MessagesViewController.m')
-rw-r--r--Juick/ViewControllers/MessagesViewController.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m
index 33c23e4..95879bf 100644
--- a/Juick/ViewControllers/MessagesViewController.m
+++ b/Juick/ViewControllers/MessagesViewController.m
@@ -28,6 +28,7 @@ static NSString *CellIdentifier = @"MessageCell";
@property(nonatomic, strong) NSString *path;
@property(nonatomic, strong) NSMutableDictionary *params;
@property(nonatomic, strong) dispatch_queue_t concurrent_queue;
+@property (nonatomic, readwrite, retain) UIView *inputAccessoryView;
@end
@@ -197,4 +198,24 @@ static NSString *CellIdentifier = @"MessageCell";
}
}
+- (BOOL) canBecomeFirstResponder {
+ return [self.path isEqualToString:[Message threadUrl]];
+}
+
+- (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