ios - 如何通过容器 View Controller 判断使用了哪些单元格?

标签 ios objective-c uitableview uistoryboard uicontainerview

目前我有以下设置,其中 Controller ReminderViewController 有一个容器 View ,该 View 引用具有三个静态单元格的 UITableViewController:enter image description here

除此之外 answer ,我还没有找到任何其他资源来说明如何做,以便当用户在单元格中切换 UISwitch 之一时,我的 SetReminderController 会收到通知并采取相应行动。我怎样才能做到这一点?谢谢!

最佳答案

从开关的操作方法中,您可以使用 self.parentViewController 访问 ReminderViewController,然后调用任何方法或在该 Controller 中设置您想要的任何属性。

关于ios - 如何通过容器 View Controller 判断使用了哪些单元格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23178527/

相关文章:

ios - Realm verify_thread 崩溃

ios - 使用 SDWebImage 下载大图像时应用程序崩溃?

ios - UITableView 和解析数据

android - 为什么 TableView (UITableView) 必须有独立的源对象来提供数据?

iOS - UITableViewCell 中的 UILabel 错误地截断了文本

ios - 快速设置状态栏的自定义颜色?

ios - 如何在 traitCollectionDidChange 的 View Controller 中更改 UIImageView 图像

ios - 在 UIScrollView Swift3 中加载 UIViewController

iphone - 让 ViewController 包含大量代码是否正确?

ios - 防止 UITableView 行被销毁