问题
My question is pretty much the same as this one but without a solution.
I have a modal view that calls to display a Greystripe full screen advert. When I dismiss the advert, it appears to take my modal view away with it as I see my main menu, however the main menu doesn't function properly and I suspect the modal view is still there, maybe moved to the back if this is even possible? I've tried using a non modal view which works fine when dismissing the advert immediately, but if clicking the ad to view content, then dismissing, again it takes away my modal view when it is removed.
Is there a way to list all loaded view controllers to see if it is still there? Is there a way to send to back, bring to front with ViewControllers?
Any other help/advice?
EDIT ---
I've added this code to my viewWillAppear of the main menu:
NSArray *viewControllers = self.navigationController.viewControllers;
NSLog(@"viewControllers:%@",viewControllers);
and it reports just itself even when coming back from the advert, however my game modal view that called the advert isn't dealloc'd. What could be happening to it?
EDIT 2 ---
I've implemented this code to add another modal view before showing the full screen ad:
- (void)greystripeFullScreenDisplayWillOpen
{
UIStoryboard *storyboard = self.storyboard;
Game3ViewController *newView = [storyboard instantiateViewControllerWithIdentifier:@"settingsView"];
[self presentModalViewController:newView animated:NO];
}
and after the ad moves away it takes BOTH the modal views with it.
If nobody can help with this, can anyone suggest an alternative to Greystripe for full screen interstitial adverts?
来源:https://stackoverflow.com/questions/11477261/greystripe-sdk-full-screen-ads-removing-modal-view-controller