问题
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