So, am attempting to use one AdBannerView for my two views in an application I am building. The views consist of a main view that shows data, and an editing view that allows the user to edit the data. I would like the banner to display on both views as appropriate (i.e. when they are viewing data or editing data).
I have attempted to follow the tutorial that Apple provides, specifically the iAdSuite tutorial, using the AdBannerNavigation tutorial as an example. The problem is that they base all of their event structure - i.e. when they add and remove the banner from the开发者_Go百科 views, and set themselves as the delegate of the banner - on when the views load and unload. Since my main view never unloads (as it is controlling large portions of the data), how can I have it pay attention to events to follow this simlar behavior? Should it be on viewWillAppear/viewWillDisappear? Or on the "did" version of both of those? Or is there some other event that I am missing that I should pay attention to?
So, after banging my head against the wall some more, I figured out a few things.
What I did was make it work on the viewDidAppear and viewWillDisappear methods for both UIs. I also found that my bindings (struts?) for the view pieces in the interface builder were not correctly set up - I had to fix those so that the items were willing to contract in a vertical direction.
精彩评论