我在这里读到了一篇关于 unwind segues 的很好的解释:What are Unwind segues for and how do you use them?。然后我尝试在我的项目中使用,一切都运行正常,只有一个问题:与 Xcode 提供的“push segue”不同,unwind segues 默认情况下会执行动画效果。为了去掉这个动画效果,我必须使用自定义 push segue,并按照Push segue in xcode with no animation中的步骤进行操作。请注意,HTML 标签将被保留。
#import <UIKit/UIKit.h>
@interface PushNoAnimationSegue : UIStoryboardSegue
@end
#import "PushNoAnimationSegue.h"
@implementation PushNoAnimationSegue
-(void) perform{
[[[self sourceViewController] navigationController] pushViewController:[self destinationViewController] animated:NO];
}
@end
我该怎么做才能关闭 unwind segue 的动画?有人可以帮忙吗?