From 4e6a313148890e30774757b382aa3b3ba1622bb6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 10 Nov 2013 18:51:44 +0400 Subject: refactoring and threadview --- Juick/NewPostViewController.m | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Juick/NewPostViewController.m') diff --git a/Juick/NewPostViewController.m b/Juick/NewPostViewController.m index 9e3db14..8c8fbf0 100644 --- a/Juick/NewPostViewController.m +++ b/Juick/NewPostViewController.m @@ -33,11 +33,23 @@ } - (void) cancelCompose { - [self.navigationController popViewControllerAnimated:YES]; + 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 { - [self.navigationController popToRootViewControllerAnimated:YES]; + 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 -- cgit v1.2.3