zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    Python之sys & os
    1161
    1142
    P1599 货币
    P1547逆转,然后再见
    P1629八
    P1753HackSon的趣味题
    Problem 2233 ~APTX4869
    1269
    1091. Tmutarakan Exams
  • 原文地址:https://www.cnblogs.com/zhangleixy/p/4934627.html
Copyright © 2011-2022 走看看