Question

I am running my app using base SDK 6.0 in XCode and then run the app in iOS 7.0(Device) after navigating to one or more screens then enable Guided Access Mode by pressing the home button thrice. Now the screen moves to MainViewController automatically and after that i am unable to navigate anywhere. The following Log can be seen in Console:Attempt to present a ViewController on another ViewController which is already presenting the ViewController.

Was it helpful?

Solution

Try putting this code in the - (void)viewDidAppear:(BOOL)animated method of your MainViewController.

[self.view.superview insertSubview:self.view atIndex:0];

Actually I was facing exactly same issue, as u described. And after research I found that, all the view hierarchy still exist in the memory, but mainViewController's view become the topmost view (Hiding others.). I do not have any logical explanation, why it is happening. I will post the details if I found any explanation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top