IOS disable push segue animation

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

In the storyboard, I am disabled Animation:

enter image description here

However, the push is still reviving. Why?

+5
source share
1 answer

This animation is the default behavior. You need to create a custom UIStoryBoardSegue, for example:

PushNoAnimationSegue.h:

#import <UIKit/UIKit.h> @interface PushNoAnimationSegue : UIStoryboardSegue @end 

PushNoAnimationSegue.m:

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

For each segue, now change the class to the one you just created and select "custom" from the view drop-down menu.

+3
source

Source: https://habr.com/ru/post/1235212/


All Articles