5

I have a storyboard with various segues for pushing ViewControllers in a NavigationController.

In storyboard i disabled Animation:

enter image description here

However the push is still animating. Why?

Lord Vermillion
  • 5,264
  • 20
  • 69
  • 109

1 Answers1

4

That animation is the default behaviour. You need to create a custom UIStoryBoardSegue like so:

PushNoAnimationSegue.h is:

#import <UIKit/UIKit.h>

@interface PushNoAnimationSegue : UIStoryboardSegue

@end

PushNoAnimationSegue.m is:

#import "PushNoAnimationSegue.h"

@implementation PushNoAnimationSegue

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

@end

For each segue now change the class to this one you just created and choose "custom" in the kind drop down menu.

Kex
  • 8,023
  • 9
  • 56
  • 129