From 188d8e4ea870d1a6c8edd5a9b323742804badeba Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 28 Aug 2016 21:03:22 +0300 Subject: project cleanup --- Juick/ViewControllers/NewPostViewController.m | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Juick/ViewControllers/NewPostViewController.m (limited to 'Juick/ViewControllers/NewPostViewController.m') diff --git a/Juick/ViewControllers/NewPostViewController.m b/Juick/ViewControllers/NewPostViewController.m new file mode 100644 index 0000000..8c8fbf0 --- /dev/null +++ b/Juick/ViewControllers/NewPostViewController.m @@ -0,0 +1,61 @@ +// +// 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 { + CATransition* transition = [CATransition animation]; + transition.duration = 0.3; + transition.type = kCATransitionFade; + transition.subtype = kCATransitionFromTop; + + [self.navigationController.view.layer addAnimation:transition forKey:kCATransition]; + [self.navigationController popViewControllerAnimated:NO]; +} + +- (void) doneCompose { + CATransition* transition = [CATransition animation]; + transition.duration = 0.3; + transition.type = kCATransitionFade; + transition.subtype = kCATransitionFromTop; + + [self.navigationController.view.layer addAnimation:transition forKey:kCATransition]; + [self.navigationController popToRootViewControllerAnimated:NO]; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end -- cgit v1.2.3