好吧,我正在使用导航 Controller 为 iPhone 创建一个应用程序,基本上我需要让我的 addviewcontroller
了解用户在 addsettingsviewcontroller
上选择的内容。因此,当用户点击“保存”按钮时,它会打开 addviewcontroller,当打开它时,它需要检查在上一个 View 上选择的值。我可以让它为我完成所有这些,但唯一的问题是,当按下保存按钮并且 addviewcontroller 加载时,导航栏不再存在,因此用户无法点击后退按钮,并且 View 的标题未显示。
这是我的照片 storyboard .
最佳答案
试试这个
Addviewcontroller *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"addView"];
controller.status = easy; // select as enum of easy, medium, hard
[self.navigationController pushViewController:controller animated:YES];
希望对你有帮助!
关于ios - 如何在导航 Controller 中将数据从一个 View 传递到另一个 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22800839/