In my app delegate, I instantiate an iAd banner and assign it to a delegate property, then I load the main View Controller.
In the main View Controller, I add the iAd banner as a subview, and also instantiate a "Main Menu" view controller and add its view as a subview. Great, now I have a main menu for my app (using UINavigationController
so other views are pushed/popped off the navigation stack, leaving the ad on top).
However, when I display a modal dialog (like send e-mail), and dismiss it, the iAd banner is gone, and the Main Menu view now takes up the whole screen. Is there something I need to do to "refresh" the iAd view on the top?
It sounds like you have 2 UIViewControllers and you are trying to manually add the subview of one to the other without using any of the container API's - i am not surprised this doesn't work properly.
See "Creating Custom Container View Controllers" in the View Controller Programming Guide for iOS, or more easily, create a UIViewController subclass which always shows an Ad on top.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With