[英]iOS disable push segue animation
That animation is the default behaviour. 该动画是默认行为。 You need to create a custom UIStoryBoardSegue like so:
你需要像这样创建一个自定义的UIStoryBoardSegue:
PushNoAnimationSegue.h is: PushNoAnimationSegue.h是:
#import <UIKit/UIKit.h>
@interface PushNoAnimationSegue : UIStoryboardSegue
@end
PushNoAnimationSegue.m is: 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 this one you just created and choose "custom" in the kind drop down menu. 现在,对于每个segue,将类更改为刚刚创建的类,并在类型下拉菜单中选择“自定义”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.