search

Home  >  Q&A  >  body text

ios - 两个ViewController传值的问题

一个ViewController 中 有一个 Container , 即一个VeiwController1中嵌套了另一个ViewController2.
这两个ViewController是同时加载的,这两个同时加载的ViewController之间该如何传值呢,自己试了很多百度的方法,都没有成功,希望能给出一个详细一点的方法,拜托各位大神了。

大家讲道理大家讲道理2892 days ago284

reply all(5)I'll reply

  • 天蓬老师

    天蓬老师2017-04-18 09:08:45

    Use Delegate to pass values ​​locally, and Notification for large areas

    reply
    0
  • 阿神

    阿神2017-04-18 09:08:45

    You can try block value transfer

    reply
    0
  • PHPz

    PHPz2017-04-18 09:08:45

    Block passing value or Delegate passing value~

    reply
    0
  • 迷茫

    迷茫2017-04-18 09:08:45

    v1 —— V2 uses segue to pass the value, because v2 is a container
    v2 —— v1 uses block or delegate to pass the value

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 09:08:45

    Use delegate or block

    reply
    0
  • Cancelreply