summaryrefslogtreecommitdiff
path: root/Juick/MessagesViewController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/MessagesViewController.m')
-rw-r--r--Juick/MessagesViewController.m11
1 files changed, 10 insertions, 1 deletions
diff --git a/Juick/MessagesViewController.m b/Juick/MessagesViewController.m
index 2f5cc29..55f8a19 100644
--- a/Juick/MessagesViewController.m
+++ b/Juick/MessagesViewController.m
@@ -9,12 +9,14 @@
#import "SWRevealViewController.h"
#import "MessagesViewController.h"
-
#import "MessageCell.h"
#import "Message.h"
#import "ColorsAndButtons.h"
+#import "NewPostViewController.h"
+
+
#import "NSURL+PathParameters.h"
#import "UIImage+Helpers.h"
@@ -101,6 +103,9 @@ static NSString *CellIdentifier = @"MessageCell";
UIBarButtonItem *revealButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"reveal-icon.png"]
style:UIBarButtonItemStyleBordered target:revealController action:@selector(revealToggle:)];
self.navigationItem.leftBarButtonItem = revealButtonItem;
+ UIBarButtonItem *compose = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose
+ target:self action:@selector(composePressed)];
+ self.navigationItem.rightBarButtonItem = compose;
}
self.messages = [NSMutableArray array];
UIRefreshControl *refresh = [[UIRefreshControl alloc] init];
@@ -113,6 +118,10 @@ static NSString *CellIdentifier = @"MessageCell";
}
+- (void) composePressed {
+ [self.navigationController pushViewController:[[NewPostViewController alloc] init] animated:YES];
+}
+
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];