结合 Flipsideview 和 navigationview

发布于 2024-08-12 00:49:45 字数 105 浏览 2 评论 0原文

当我尝试结合 Flipsideview 和导航视图时,出现以下错误 controller.delegate = self 行上的“对成员“委托”的请求不在结构或联合中”;

when i am trying to combine flipsideview and navigation view i am getting following error
"request for member 'delegate' is something not in a structure or union" on the line controller.delegate = self;

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陌若浮生 2024-08-19 00:49:45

在视图控制器的实现中,您可以通过属性 navigationController

controller.navigationController.delegate = self;

这假设您的视图控制器实现了 UINavigationControllerDelegate 协议。

另外,我发现在 viewWillAppear:viewWillDisappear: 而不是实现上述导航协议。

In your view controller's implementation, you can set the delegate of the UINavigationController through the property navigationController:

controller.navigationController.delegate = self;

This assumes that your view controller implements the UINavigationControllerDelegate protocol.

Also, I have found that it is easier to handle functionality related to view switching in viewWillAppear: and viewWillDisappear: rather than implementing the above navigation protocol.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文