开发者

UISplitViewController with UIPopoverController crashes on rotate

开发者 https://www.devze.com 2023-02-01 01:35 出处:网络
When using a UISplitViewController in portrait , I have a settings popover that I display.If I rotate the device to landscape 开发者_StackOverflow中文版while the popover is displayed, the app crashes.

When using a UISplitViewController in portrait , I have a settings popover that I display. If I rotate the device to landscape 开发者_StackOverflow中文版while the popover is displayed, the app crashes.

This is because the IPad can only display one popover at a time, and the UISplitViewController shows a popup on rotate -- and that happens BEFORE either view gets a deviceWillRotate message.

It there another message I can capture so I can dismiss my popup before the UISplitViewController shows it's popup?


What I needed was the UISplitViewControllerDelegate methods. There is a method that gets called right before the popover is created. That was the hook I needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消