Is it possible to do a fade in and fade out transition between View Controllers in Storyboard. Or without transition.
If it\'s possible, what\'s the code for it?
For creating Custom Segue create subclass of UIStoryboard segue. For example:
// MCFadeSegue.h
#import
@interface MCFadeSegue : UIStoryboardSegue
@end
// MCFadeSegue.m
#import
#import "MCFadeSegue.h"
@implementation MCFadeSegue
- (void)perform
{
CATransition *transition = [CATransition animation];
transition.duration = 0.5;
transition.type = kCATransitionFade;
[[[[[self sourceViewController] view] window] layer] addAnimation:transition
forKey:kCATransitionFade];
[[self sourceViewController]
presentViewController:[self destinationViewController]
animated:NO completion:NULL];
}
@end
Then in MainStoryboard.storyboard choose segue and set Style:Custom and Class:MCFadeSegue.