passing data back to a previously allocated UIViewController

后端 未结 3 1605
傲寒
傲寒 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:11

    You could use a shared singleton? http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html

    Or save the parameters to nsuserdefaults and read them back in in your first viewcontroller

    or some other temporary store such as your appdelegate

    I've used all three of the above approaches before.

提交回复
热议问题