How to determine if a full-screen iAd is being presented without polling or delegates?

| | August 10, 2015

When a full-screen ad is launched and screen control is lost, I want to prevent popups and notifications with loose coupling.

I’m aware of the delegate methods like

- (BOOL) interstitialAdActionShouldBegin:(ADInterstitialAd *)interstitialAd

and the possibility of polling the property

@property(nonatomic, readonly, getter=isActionInProgress) BOOL actionInProgress

But it must be assumed they are not available. Without setting some global variable so as to maintain loose coupling, what is another way to determine if a full-screen iAd is being presented? For example, can the UIView hierarchy be traversed for some indication?

The goal is to make a self-contained, automatic popup (think iVersion) which postpones its display if an iAd is showing.

Leave a Reply