iphone - 父 View Controller 中是否有一个委托(delegate)在模态视图被关闭后被调用?

标签 iphone ios ipad ios4 modalviewcontroller

模态视图 Controller 被关闭后,是否调用任何委托(delegate)方法将父 View Controller 带到前面?

最佳答案

我最终使用了 Apple 的 iOS View Controller 编程指南中的委托(delegate):

http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html#//apple_ref/doc/uid/TP40007457-CH111-SW14

When it comes time to dismiss a modal view controller, the preferred approach is to let the parent view controller do the dismissing. In other words, the same view controller that presented the modal view controller should also take responsibility for dismissing it whenever possible. Although there are several techniques for notifying a parent view controller that it should dismiss its modally presented child, the preferred technique is delegation.

在添加适合我想要做的菜谱时,CoreDataRecepies 示例代码中有一个很好的示例。

关于iphone - 父 View Controller 中是否有一个委托(delegate)在模态视图被关闭后被调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6550583/

相关文章:

ios - 如何使用 xmpp ios 加入群组并获取现有群组的列表

ios设置AppleLanguages并提交到应用商店

ios - Flutter TextField Ipad中文输入法,选择始终放在最前面

iphone - 使 tableviewcell 在显示键盘时向上滚动

ios - 由于 json 问题,Restkit 在 iOS 8 中崩溃?

iPhone RestKit 如何启用 RKLogDebug?

iphone - 在内存中加载 View ——viewWillAppear 方法调用

iphone - 滚动 UITableView 标题?

iPhone:核心数据,如何从数据库获取值的总和

iphone - 设置 VC.view 出现在父 VC 的 View 中,不适合我