UINavigationController /重新加载视图/使用视图!

时间:2010-07-27 22:38:27

标签: iphone xcode uiview uiviewcontroller uinavigationcontroller

我有一个基于视图的项目使用UINavigationController。

RootViewController在创建新条目时执行写入数据模型的操作。

我的主屏幕上有一个添加(+)按钮,用于添加带有时间戳的条目,并将其记录到数据模型中。

我想点击添加按钮,浏览资产列表,并记录包含资产URL的条目,以便我可以播放资产。

我按下了添加按钮,然后我就这样启动了一个新的XIB:

pickerViewController = [[MyPickerViewController alloc] 
initWithNibName:@"MyPickerViewController" bundle:nil];

//---set the property of the second view with the DatePicker view in the                current          view---
pickerViewController.myURL = importVideoURL;    

然后,一旦我抓住了我想用我的条目存储的关联资产网址,我就会从超级视图中移除视图,以便使用以下命令返回主视图:

[self.view removeFromSuperview]

我的问题:我无法找到任何通知或方法,例如viewDidAppear等,它允许我继续执行我的rootViewController,我可以在其中编写条目。

我错过了什么?

HALP!

1 个答案:

答案 0 :(得分:0)

您将需要阅读Apple的navigation controller documentation,并通过推送和弹出视图控制器来完成工作。当您将选择器视图控制器从堆栈中弹出时,您可以在根视图控制器中调用-viewDidAppear:以继续进行数据模型更新。