summaryrefslogtreecommitdiff
path: root/Juick
diff options
context:
space:
mode:
Diffstat (limited to 'Juick')
-rw-r--r--Juick/Supporting Files/Juick-Prefix.pch1
-rw-r--r--Juick/ViewControllers/MessagesViewController.h2
-rw-r--r--Juick/ViewControllers/MessagesViewController.m21
3 files changed, 23 insertions, 1 deletions
diff --git a/Juick/Supporting Files/Juick-Prefix.pch b/Juick/Supporting Files/Juick-Prefix.pch
index 5b3ccf0..f69266f 100644
--- a/Juick/Supporting Files/Juick-Prefix.pch
+++ b/Juick/Supporting Files/Juick-Prefix.pch
@@ -23,4 +23,5 @@
#import <AFNetworking/AFNetworking.h>
#import <YYModel/YYModel.h>
#import <DateTools/DateTools.h>
+ #import <PHFComposeBarView/PHFComposeBarView.h>
#endif
diff --git a/Juick/ViewControllers/MessagesViewController.h b/Juick/ViewControllers/MessagesViewController.h
index 613ac64..3dac200 100644
--- a/Juick/ViewControllers/MessagesViewController.h
+++ b/Juick/ViewControllers/MessagesViewController.h
@@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
-@interface MessagesViewController : UITableViewController
+@interface MessagesViewController : UITableViewController<PHFComposeBarViewDelegate>
- (void)loadFromPath:(NSString *)messagesPath withParams:(NSDictionary *)params withTitle:(NSString *)title;
- (void) refreshData;
- (void) composePressed;
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