Search code examples
iosiphoneios9iad

Undesirable visual behaviour to view controller when interstitial iAd closes


Ok so I've just implemented interstitial iAds in one of my iOS apps and I'm getting some unexpected behaviour. The code looks essentially like this:

//viewdidload
self.interstitialPresentationPolicy = ADInterstitialPresentationPolicyManual;

//call ad
[self requestInterstitialAdPresentation];

Now this all works as required, but when the user presses the X button in the top left corner of the ad to close it, the ad slides away successfully, but it also vertically "bounces" the view that is being returned to the user which is the undesirable visual behaviour that I want to get rid of.

It happens so fast that I can't screenshot it, but it's like the whole view vertically slides underneath the status bar at the top of the iPhone just for a fraction of a second, and then returns to it's normal position. It looks very odd.

Any suggestions would be greatly appreciated.


Solution

  • Update: I found the problem - any object that is connected as a constraint to the top layout guide is susceptible to the undesirable visual issue. I have modified my constraints to circumvent the problem. Presumably the top layout guide moves during interstitial closure, thereby moving objects on the page in an undesirable fashion. I do not know if this is intended behaviour by apple, so I will report it.