【发布时间】:2014-01-18 16:21:32
【问题描述】:
我从这里读到了关于 unwind segues 的精彩解释: What are Unwind segues for and how do you use them? 然后在我自己的项目中尝试,一切正常,只有一个问题,正如“push segue”Xcode提供的那样,展开segues默认执行动画,我必须使用自定义push segue来摆脱动画,然后是这个:Push segue in xcode with no animation
#import <UIKit/UIKit.h>
@interface PushNoAnimationSegue : UIStoryboardSegue
@end
#import "PushNoAnimationSegue.h"
@implementation PushNoAnimationSegue
-(void) perform{
[[[self sourceViewController] navigationController] pushViewController:[self destinationViewController] animated:NO];
}
@end
我还能做些什么来关闭展开转场的动画。有人可以帮忙吗?
【问题讨论】:
-
Apple 已经在示例项目中实现了 unwind,看看developer.apple.com/library/iOS/samplecode/UnwindSegue/Listings/… 可以将动画设置为 no
标签: ios uistoryboardsegue