passing data back to a previously allocated UIViewController

后端 未结 3 1633
傲寒
傲寒 2021-01-28 05:18

I have a view controller that then has a button that passes to an option menu.

When options are set they need to be past back to the previously allocated viewcontroller.

3条回答
  •  没有蜡笔的小新
    2021-01-28 06:12

    When you init your option viewController, pass it a reference to its parent.

    I.E.

    [[OptionViewController alloc] initWith...: parent:];
    

    Use a @property or a method or somesuch to call on the parent to pass the data back.

提交回复
热议问题