IOS dismissViewControllerAnimated 传值
1.新建PassValueDelegate.h
@protocol PassValueDelegate <NSObject>
-(void)passValue:(NSString *)value;
@end
2.
@interface AViewController : UIViewController<PassValueDelegate>
-(void)passValue:(NSString *)value{
NSLog(@"get backcall value=%@",value);
}
-(void)newView
{
newViewController.delegate = self;
}
3. newViewController
self dismissViewControllerAnimated:YES completion:^{
//通过委托协议传值
[self.delegate passValue:@"passValue"];
}];
转载
http://ikrboy.iteye.com/blog/2007046