【发布时间】:2015-11-04 15:24:48
【问题描述】:
【问题讨论】:
标签: ios swift navigationcontroller
【问题讨论】:
标签: ios swift navigationcontroller
该动画是默认行为。您需要像这样创建自定义 UIStoryBoardSegue:
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
现在将每个 segue 的类更改为您刚刚创建的类,然后在种类下拉菜单中选择“自定义”。
【讨论】: