Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unwind segues---Animation

I read a great explain about unwind segues from here: What are Unwind segues for and how do you use them? Then tried in my own project, everything works fine, only one question, as the "push segue" Xcode provides, the unwind segues perform with animation by default, I have to use a custom push segue to get rid of the animation followed by this:Push segue in xcode with no animation

#import <UIKit/UIKit.h>

@interface PushNoAnimationSegue : UIStoryboardSegue

@end

#import "PushNoAnimationSegue.h"

@implementation PushNoAnimationSegue
-(void) perform{
    [[[self sourceViewController] navigationController] pushViewController:[self destinationViewController] animated:NO];
}
@end

what can I do to turn off the animation of unwind segues as well. Can anyone help?

like image 784
Jillian Avatar asked Dec 31 '13 19:12

Jillian


1 Answers

For iOS9:

Interface Builder (in Xcode 7) lists unwind segues. From there, you can select it and simply uncheck the animated property to turn off the unwind animation.

Animates property of an unwind segue

For iOS 7 and 8:

In the unwind method of the destination controller you have to pop with animated: NO.

like image 174
Raphaël Avatar answered Sep 21 '22 16:09

Raphaël