views:

139

answers:

1

The easiest way to see this problem will be to run the sample project here:

http://drop.io/stackproblem

Basically, It's a uisplitviewcontroller which can be switched between 2 detail views, both of which are navigation controllers.

The problem is that it crashes with the following error:

MultipleDetailViews[8531:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Popovers cannot be presented from a view which does not have a window.'

It crashes with this error if you use the app in PORTRAIT and you navigate (still in portrait) from the first controller, to the second, to the first, to the second, and then boom CRASH using the popover controller.

One way to stop the crash is to stop lazy loading the navigation controllers and to load them fresh everytime but this isn't an option for the app I'm making.

Any ideas and I may fall in love.

Thanks

Dan

A: 

Do search before asking question... here is same question..SO Question 1

KiranThorat
How do you know? I've read this thread already today and couldn't see it as a suitable answer to the question above. Yes it's the same exception but different situation.
Morgz
Or to rephrase.. How can I use that answer to stop this crash?
Morgz