Reputation: 972
I have an UISplitViewController in a TabbarController, it works fine until I left the SplitView in portrait mode and change in my other view to landscape and go back to my splitview tab. After that my controller try to call willPresentViewController and this fails with
2012-11-08 10:08:27.047 app[77747:c07] *** Assertion failure in -[UIPopoverController _incrementSlideTransitionCount:],
/SourceCache/UIKit_Sim/UIKit-2372/UIPopoverController.m:510
I thought it happened because the splitview didnt rotate when I came back. I tried this control https://github.com/grgcombs/IntelligentSplitViewController but it didnt work either.
I can resolve it a bit but I have the problem now that the master in landscape is always black when I rotate in the kind I described.
Upvotes: 0
Views: 268
Reputation: 23233
The whole "leave tab, rotate, come back to tab" can be a pain because inactive tabs don't get the rotation events.
In the past I have used two different ways to solve the issue:
UITabBarController
which forwarded rotation events to UIViewControllers
even if they were not the active tab.UIViewController
which needs to know about rotations use the NSNotificationCenter
and register for the event UIDeviceOrientationDidChangeNotification
Which one I used really depended on how many of my tabs needed to track that information. If 1 tab needs the info, #2 is probably the direction to head, but if 4 out of 5 need it, then #1 is probably the way to go.
Upvotes: 1