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

 

posted on 2015-11-03 22:41  StanleyZhang  阅读(1170)  评论(0编辑  收藏  举报