// // NewPostViewController.m // Juick // // Created by Vitaly Takmazov on 07.11.13. // Copyright (c) 2013 com.juick. All rights reserved. // #import "NewPostViewController.h" #import "ColorScheme.h" @interface NewPostViewController () @property (nonatomic, assign) BOOL didSetupConstraints; @end @implementation NewPostViewController - (void)viewDidLoad { [super viewDidLoad]; self.navigationController.visibleViewController.title = @"Post"; self.view.backgroundColor = [ColorScheme mainBackground]; self.navigationController.visibleViewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancelCompose)]; self.navigationController.visibleViewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(doneCompose)]; } - (void) cancelCompose { [self.navigationController.visibleViewController.navigationController popViewControllerAnimated:YES]; } - (void) doneCompose { [self.navigationController.visibleViewController.navigationController popToRootViewControllerAnimated:YES]; } @end