iPad SplitViewController 奇怪的行为

发布于 2024-10-09 10:42:30 字数 177 浏览 0 评论 0原文

我有一个使用 SplitViewController 的应用程序。当我启动应用程序并将设备(或模拟器)保持在纵向模式时,第一次出现“DetailView”时,它不会显示弹出按钮,而如果我将 iPad 设为横向模式,然后返回纵向模式,按钮正确显示。 我四处搜索,发现应该在其中显示按钮的工具栏在首次启动时为空。

我应该怎么办?

I have an Application that uses SplitViewController. When I launch the App and keep the device (or the Simulator) in Portrait Mode, the first time the "DetailView" appears, it doesn't show the popover button, while if I turn the iPad in Landscape Mode, then back to Portrait, the button shows itself correctly.
I've searched around and I discovered that the toolbar where I should present the button is null at the time of first launch.

What should I do?

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

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

发布评论

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

评论(1

行至春深 2024-10-16 10:42:30

在将窗口设置为 [self.window makeKeyAndVisible]; 之前,您必须在代码中设置委托,因此要么在界面生成器中链接委托,要么在应用程序中呈现窗口之前调用它,并完成启动方法。

You must set the delegate in your code before you set the window to [self.window makeKeyAndVisible];, so either link the delegate in interface builder or simply call it before you present the window in your application did finish launching method.

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