iPad SplitViewController 奇怪的行为
我有一个使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在将窗口设置为 [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.