> For the complete documentation index, see [llms.txt](https://docs.bidapp.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bidapp.io/integration/ios/interstitial-ads.md).

# Interstitial Ads

Interstitial Ads are loaded automatically. You can observe ad loading events by specifying the delegate:

{% tabs %}
{% tab title="Objective-C" %}

```objectivec
BIDInterstitial *interstitial = [BIDInterstitial new];
interstitial.loadDelegate = loadDelegate;
```

{% endtab %}

{% tab title="Swift" %}

```swift
let interstitial = BIDInterstitial()
interstitial.loadDelegate = loadDelegate
```

{% endtab %}
{% endtabs %}

The delegate should implement the following methods:

{% tabs %}
{% tab title="Objective-C" %}

```objectivec
#pragma mark - BIDFullscreenLoadDelegate protocol methods

- (void)didLoadAd:(BIDAdInfo*)adInfo
{
    NSLog(@"Interstitial - didLoadAd. AdInfo: %@", adView, adInfo);
}

- (void)didFailToLoadAd:(BIDAdInfo*)adInfo error:(NSError *)error
{
    NSLog(@"Interstitial - didFailToLoadAd. AdInfo: %@. Error: %@", adInfo, error);
}
```

{% endtab %}

{% tab title="Swift" %}

```swift
//BIDFullscreenLoadDelegate protocol methods

func didLoadAd(_ adInfo: BIDAdInfo) {
    print("Interstitial - didLoadAd. AdInfo: \(adInfo)")
}
    
func didFail(toLoadAd adInfo: BIDAdInfo, error: Error) {
    print("Interstitial - didFailToLoadAd. AdInfo: \(adInfo). Error: \(error)")
}
```

{% endtab %}
{% endtabs %}

## Showing an Interstitial Ad

To show an interstitial ad, call `showWithDelegate` instance method of the `BIDInterstitial` class:

{% tabs %}
{% tab title="Objective-C" %}

```objectivec
[interstitial showWithDelegate:theDelegate];
```

{% endtab %}

{% tab title="Swift" %}

```swift
interstitial.show(with: theDelegate)
```

{% endtab %}
{% endtabs %}

The delegate should implement the following methods:

{% tabs %}
{% tab title="Objective-C" %}

```objectivec
#pragma mark - BIDInterstitialDelegate protocol mehods

//TODO: simplify this method. It should simply return the appropriate View Controller to display ad
- (UIViewController*)viewControllerForDisplayAd
{
    return viewController;
}

- (void)didDisplayAd:(BIDAdInfo*)adInfo
{
    NSLog(@"Interstitial - didDisplayAd. AdInfo: %@", adView, adInfo);
}

- (void)didClickAd:(BIDAdInfo*)adInfo
{
    NSLog(@"Interstitial - didClickAd. AdInfo: %@", adView, adInfo);
}

- (void)didHideAd:(BIDAdInfo*)adInfo
{
    NSLog(@"Interstitial - didHideAd. AdInfo: %@", adView, adInfo);
}

- (void)didFailToDisplayAd:(BIDAdInfo*)adInfo error:(NSError *)error
{
    NSLog(@"Interstitial - didFailToDisplayAd. AdInfo: %@ Error: %@", adInfo, error);
}

-(void)allNetworksDidFailToDisplayAd
{
    NSLog(@"Interstitial - allNetworksDidFailToDisplayAd");
}
```

{% endtab %}

{% tab title="Swift" %}

```swift
//BIDInterstitialDelegate protocol mehods
    
//TODO: simplify this method. It should simply return the appropriate View Controller to display ad
func viewControllerForDisplayAd() -> UIViewController {
    return viewController;
}
    
func didDisplayAd(_ adInfo: BIDAdInfo) {
    print("Interstitial - didDisplayAd. AdInfo: \(adInfo)")
}
    
func didClickAd(_ adInfo: BIDAdInfo) {
    print("Interstitial - didClickAd. AdInfo: \(adInfo)")
}
    
func didHideAd(_ adInfo: BIDAdInfo) {
    print("Interstitial - didHideAd. AdInfo: \(adInfo)")
}
    
func didFail(toDisplayAd adInfo: BIDAdInfo, error: Error) {
    print("Interstitial - didFail toDisplayAd. AdInfo: \(adInfo). Error: \(error)")
}
    
func allNetworksDidFailToDisplayAd() {
    print("Interstitial - allNetworksDidFailToDisplayAd.")
}
```

{% endtab %}
{% endtabs %}

## Stopping and Starting Auto-Load

By default, Interstitials preload ads before any load attempt. So an Interstitial can use already preloaded ads instead of waiting on a manual load call to load new ads. To disable this feature you need to call the following method:

{% tabs %}
{% tab title="Objective-C" %}

```objectivec
interstitial.autoload = NO;
```

{% endtab %}

{% tab title="Swift" %}

```swift
interstitial.autoload = false
```

{% endtab %}
{% endtabs %}

Once you disable autoload, you should load ads manually every time you need them to show:

{% tabs %}
{% tab title="Objective-C" %}

```objectivec
[interstitial load];
```

{% endtab %}

{% tab title="Swift" %}

```swift
interstitial.load()
```

{% endtab %}
{% endtabs %}
