Skip to content

iOS Banner Advanced Usage

Mert Celik edited this page Sep 24, 2018 · 1 revision

If default Top and Bottom positions are not fitting the view hierarchy of your app, you can give it a custom positioning like in the example below:

N.B: If you want to use advanced usage, do NOT enable auto-loading for that format.

1. Add the banner to your custom view

[YOUR_CUSTOM_VIEW addSubview:[AMBanner sharedInstance]];

2. Setup the frame of the banner

[AMBanner sharedInstance].frame = CGRectMake(0,0,YOUR_CUSTOM_VIEW.bounds.size.width, 50);

3. Load the banner

[AMBanner loadAd];

4. Remove the banner when needed

[AMBanner removeBanner];
Clone this wiki locally