iOS8 StoryBoard 连线diss方法

时间:2023-12-16 22:12:50

添加自定义Dismiss类;

//  Dismiss.h

//  StoryBoardTest

//

//  Created by zhujin on 14/12/23.

//  Copyright (c) 2014年 zhujin. All rights reserved.

//

#import <UIKit/UIKit.h>

@interface Dismiss : UIStoryboardSegue

@end

// .m中

#import "Dismiss.h"

@implementation Dismiss

- (void)perform

{

UIViewController *sourceViewController = self.sourceViewController;

[sourceViewController.presentingViewController dismissViewControllerAnimated:YES completion:^{

}];

}

@end