I ran into a transition problem today. It's hard to explain to I recorded a very short clip. I want the first transition (when I click on the + button) to look exactly like the second one (when I click on
Here's the clip:
this is my code :
I ran into a transition problem today. It's hard to explain to I recorded a very short clip. I want the first transition (when I click on the + button) to look exactly like the second one (when I click on
Here's the clip:
this is my code :
How are you doing it now then? You didn't give a lot of info but you're using a navigation controller right? Do you need to? One option is to present the second screen from the first. In that case you handle the transitions yourself and you could even give the two view controllers a common base class if several components (like the + sign) are common to both. I have some code I can post if that might be useful...
To present and dismiss a vc:
Have a second view controller as a property in your root view controller:
@property (nonatomic, strong) UIViewController *secondViewController;
in the button pressed method for your plus button:
[self presentViewController:_secondViewController animated:YES completion:nil];
in your presented view controller, in the button pressed method for your back button:
[self dismissViewControllerAnimated:YES completion:^{
}];
Also, if you want to slide horizontally as in this case you'll need to do some custom animation, by creating an animator object that is a UIVIewControllerAnimatedTransitioning delegate. I recommend you read up on that - I also have some examples of that for you if you wish.
Cheers.