iPad SplitViewController Strange Behaviour

社会主义新天地 提交于 2019-12-11 12:16:42

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/4537827/ipad-splitviewcontroller-strange-behaviour

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!