summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-12-10 11:09:34 +0300
committerGravatar Vitaly Takmazov2019-12-10 11:09:34 +0300
commit925072af5ee9febc3cbefed45505f4857eb88e5e (patch)
tree7f5bc88786b85b23b2d2bfacf200d73e838efbae /Juick/ViewControllers
parentb438eaa6668204e7f13c87879920111f00fa054a (diff)
Cancel button in New post view
Diffstat (limited to 'Juick/ViewControllers')
-rw-r--r--Juick/ViewControllers/NewPostViewController.h1
-rw-r--r--Juick/ViewControllers/NewPostViewController.m3
2 files changed, 4 insertions, 0 deletions
diff --git a/Juick/ViewControllers/NewPostViewController.h b/Juick/ViewControllers/NewPostViewController.h
index 9d1297c..637aa08 100644
--- a/Juick/ViewControllers/NewPostViewController.h
+++ b/Juick/ViewControllers/NewPostViewController.h
@@ -19,5 +19,6 @@ extern NSString * const ReplyPostedNotificationName;
@property (strong, nonatomic) NSString *draft;
@property (strong, nonatomic) Message *replyTo;
+- (IBAction)cancelPost:(id)sender;
@end
diff --git a/Juick/ViewControllers/NewPostViewController.m b/Juick/ViewControllers/NewPostViewController.m
index 4bb3758..e4b5ac7 100644
--- a/Juick/ViewControllers/NewPostViewController.m
+++ b/Juick/ViewControllers/NewPostViewController.m
@@ -101,4 +101,7 @@ NSString * const ReplyPostedNotificationName = @"ReplyPosted";
self.navigationItem.rightBarButtonItem.enabled = [textView.text length];
}
+- (IBAction)cancelPost:(id)sender {
+ [self dismissViewControllerAnimated:YES completion:nil];
+}
@end