您的位置:首页 > 产品设计 > UI/UE

自定义segue

2015-08-05 13:14 393 查看
自定义segue

继承UIStoryboardSegue这个类,并重写这个类中的- (void) perform方法

例:

#import <UIKit/UIKit.h>

@interface XYJPushWithoutAmimation : UIStoryboardSegue

@end


实现:

#import "XYJPushWithoutAmimation.h"

@implementation XYJPushWithoutAmimation

- (void)perform
{
UIViewController *source = self.sourceViewController;
UIViewController *destination = self.destinationViewController;
[source.navigationController pushViewController:destination animated:NO];
}

@end


写好上面的自定义segue类后,只需要在storyboard中使用custom的segue上写上该类即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: