【发布时间】:2013-07-08 12:55:00
【问题描述】:
我正在使用 Story Board 开发基于 iPhone 导航的应用程序。 在我的一个视图中,我通过 Storyboard Interface Builder 添加了一个自定义 NSObject,并为其分配了一个自定义类 myCustomClass。
在 myCustomClass 的实现中,我需要推送到导航控制器内的新视图。
我尝试了以下几行的变化,但没有成功,但也没有错误。
NFRecipesSummaryViewController *recipeSummaryView = [[NFRecipesSummaryViewController alloc] init];
[self.parentViewController.navigationController pushViewController:recipeSummaryView animated:YES];
或
NFRecipesSummaryViewController *recipeSummaryView = [[NFRecipesSummaryViewController alloc] init];
[self.presentingViewController presentViewController:recipeSummaryView animated:YES completion:nil];
目标视图 (recipeSummaryView) 已通过 Storyboard 创建。
感谢所有反馈。
【问题讨论】:
标签: iphone view uiviewcontroller uinavigationcontroller