summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2013-11-07 11:01:08 +0400
committerGravatar Vitaly Takmazov2013-11-07 11:01:08 +0400
commit8c69b5408e5d2870d60f15662f1d567e6cd55da7 (patch)
tree563a9e95a376be23789985f680158c70461fdc22
parentb3eaef8a304ce89242c649cfd0386a66e463acb2 (diff)
NewPostViewController stub
-rw-r--r--Juick.xcodeproj/project.pbxproj6
-rw-r--r--Juick/MessagesViewController.h1
-rw-r--r--Juick/MessagesViewController.m11
-rw-r--r--Juick/NewPostViewController.h13
-rw-r--r--Juick/NewPostViewController.m49
5 files changed, 79 insertions, 1 deletions
diff --git a/Juick.xcodeproj/project.pbxproj b/Juick.xcodeproj/project.pbxproj
index 0e7a9b3..c4ed003 100644
--- a/Juick.xcodeproj/project.pbxproj
+++ b/Juick.xcodeproj/project.pbxproj
@@ -21,6 +21,7 @@
77317BD0181BBE8500D60005 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77317BAF181BBE8500D60005 /* UIKit.framework */; };
77317BD8181BBE8500D60005 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 77317BD6181BBE8500D60005 /* InfoPlist.strings */; };
77317BDA181BBE8500D60005 /* JuickTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 77317BD9181BBE8500D60005 /* JuickTests.m */; };
+ 77975A1D182B6E9A00410C2B /* NewPostViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77975A1C182B6E9A00410C2B /* NewPostViewController.m */; };
77A0954A181F1F25002BDECD /* Message.m in Sources */ = {isa = PBXBuildFile; fileRef = 77A09549181F1F25002BDECD /* Message.m */; };
77C67EDE182827DB00427098 /* reveal-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 77C67EDC182827DB00427098 /* reveal-icon.png */; };
77C67EDF182827DB00427098 /* reveal-icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 77C67EDD182827DB00427098 /* reveal-icon@2x.png */; };
@@ -63,6 +64,8 @@
77317BD5181BBE8500D60005 /* JuickTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "JuickTests-Info.plist"; sourceTree = "<group>"; };
77317BD7181BBE8500D60005 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
77317BD9181BBE8500D60005 /* JuickTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JuickTests.m; sourceTree = "<group>"; };
+ 77975A1B182B6E9A00410C2B /* NewPostViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewPostViewController.h; sourceTree = "<group>"; };
+ 77975A1C182B6E9A00410C2B /* NewPostViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewPostViewController.m; sourceTree = "<group>"; };
77A09548181F1F25002BDECD /* Message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Message.h; sourceTree = "<group>"; };
77A09549181F1F25002BDECD /* Message.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Message.m; sourceTree = "<group>"; };
77C67EDC182827DB00427098 /* reveal-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "reveal-icon.png"; sourceTree = "<group>"; };
@@ -170,6 +173,8 @@
77C67EF11828442C00427098 /* UIImage+Crop.m */,
77DC49E618296EA300A1136A /* UIImage+Helpers.h */,
77DC49E718296EA300A1136A /* UIImage+Helpers.m */,
+ 77975A1B182B6E9A00410C2B /* NewPostViewController.h */,
+ 77975A1C182B6E9A00410C2B /* NewPostViewController.m */,
);
path = Juick;
sourceTree = "<group>";
@@ -343,6 +348,7 @@
77A0954A181F1F25002BDECD /* Message.m in Sources */,
77317BC2181BBE8500D60005 /* MessagesViewController.m in Sources */,
77C67EE21828288C00427098 /* RevealPanelViewController.m in Sources */,
+ 77975A1D182B6E9A00410C2B /* NewPostViewController.m in Sources */,
77C67EE81828379700427098 /* ColorsAndButtons.m in Sources */,
77C67EE51828342000427098 /* NSURL+PathParameters.m in Sources */,
77317BB8181BBE8500D60005 /* main.m in Sources */,
diff --git a/Juick/MessagesViewController.h b/Juick/MessagesViewController.h
index a5081de..be69672 100644
--- a/Juick/MessagesViewController.h
+++ b/Juick/MessagesViewController.h
@@ -11,4 +11,5 @@
@interface MessagesViewController : UITableViewController<UISplitViewControllerDelegate>
- (id)initWithURL:(NSURL *)messagesURL;
- (void) refreshData:(UIRefreshControl *)refresh;
+- (void) composePressed;
@end
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];
diff --git a/Juick/NewPostViewController.h b/Juick/NewPostViewController.h
new file mode 100644
index 0000000..ceaca49
--- /dev/null
+++ b/Juick/NewPostViewController.h
@@ -0,0 +1,13 @@
+//
+// NewPostViewController.h
+// Juick
+//
+// Created by Vitaly Takmazov on 07.11.13.
+// Copyright (c) 2013 com.juick. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NewPostViewController : UIViewController
+
+@end
diff --git a/Juick/NewPostViewController.m b/Juick/NewPostViewController.m
new file mode 100644
index 0000000..9e3db14
--- /dev/null
+++ b/Juick/NewPostViewController.m
@@ -0,0 +1,49 @@
+//
+// NewPostViewController.m
+// Juick
+//
+// Created by Vitaly Takmazov on 07.11.13.
+// Copyright (c) 2013 com.juick. All rights reserved.
+//
+
+#import "NewPostViewController.h"
+
+@interface NewPostViewController ()
+
+@end
+
+@implementation NewPostViewController
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ // Custom initialization
+ }
+ return self;
+}
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
+ target:self action:@selector(cancelCompose)];
+ self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
+ target:self action:@selector(doneCompose)];
+}
+
+- (void) cancelCompose {
+ [self.navigationController popViewControllerAnimated:YES];
+}
+
+- (void) doneCompose {
+ [self.navigationController popToRootViewControllerAnimated:YES];
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Dispose of any resources that can be recreated.
+}
+
+@end