Integrate with Enhance - Native iOS
Banner Ads
Banner is a rectangle filled with an advertising content, displayed on the screen without interrupting the flow of your app.
Example Usage
// Toggle the banner ad if (isBannerAdShown) { [Enhance hideBannerAd]; isBannerAdShown = false; } else { bool isBannerAdReady = [Enhance isBannerAdReady]; if(isBannerAdReady) { [Enhance showBannerAdWithPosition:POSITION_BOTTOM]; isBannerAdShown = true; } }
Methods
Enhance isBannerAdReady
BOOL [Enhance isBannerAdReady]
Return Value:
Returns true
if any ad is ready, false
otherwise. When app is not Enhanced, always returns true
.
Enhance.isBannerAdReady
BOOL [Enhance.isBannerAdReady:
(NSString*) placement
]
Parameters:
NSString* placement
- Specifies the internal placement of the ad (from the Enhance mediation editor).
Return Value:
Returns true
if any ad is ready, false
otherwise. When app is not Enhanced, always returns true
.
Enhance showBannerAdWithPosition
void [Enhance showBannerAdWithPosition:
(Position) position
]
Parameters:
Position position
- Specifies the position of this ad on the screen. See the Properties section for the values you can use.
Enhance showBannerAdWithPosition
void [Enhance showBannerAdWithPosition:
(NSString*) placement,
position:(Position) position
]
Parameters:
NSString* placement
- Specifies the internal placement of the ad (from the Enhance mediation editor).
Position position
- Specifies the position of this ad on the screen. See the Properties section for the values you can use.
Enhance hideBannerAd
void [Enhance hideBannerAd]
Properties
NSString* PLACEMENT_DEFAULT
The default internal placement of all ad types. Always equal to "default"
.
Position POSITION_TOP
Indicates that the banner will be shown on the top of the screen.
Position POSITION_BOTTOM
Indicates that the banner will be shown on the bottom of the screen.