gpt4 book ai didi

swift - iOS8 UISplitViewController : who should be the delegate?

转载 作者:行者123 更新时间:2023-11-28 09:19:37 25 4
gpt4 key购买 nike

在 iOS7 之前,文档建议将细节 View Controller 设置为 UISplitViewController 委托(delegate)。

有了新的 API showDetailViewController,细节 View Controller 每次都会被释放和重新分配,所以它不能再是 Split 委托(delegate)。哪个对象现在是最佳代表的候选人?

最佳答案

我会使用包含 Split View Controller 的 Root View Controller 作为委托(delegate)。它拥有 Split View Controller ,因此响应来自 Split View Controller 的消息是有意义的。

关于swift - iOS8 UISplitViewController : who should be the delegate?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25852355/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com