# TDBannerViewDelegate Protocol Reference

Conforms to | NSObject
Declared in | TDBannerViewDelegate.h

## Overview

TDBannerViewDelegate defines methods you can implement to receive life-cycle information about a TDBannerView.

### `– bannerViewDidPresentAd:`

Sent when TDBannerView presents an ad. This is a good opportunity to show, add to hierarchy or animate the banner if it has not being displayed yet.

`- (void)bannerViewDidPresentAd:(TDBannerView *)bannerView`

#### Parameters

`bannerView` | The banner that presented an ad.

#### Declared In

`TDBannerViewDelegate.h`

### `– bannerView:didFailToPresentAdWithError:`

Sent if a TDBannerView failed to present an ad. Normally it happens if there’s no ad available (no inventory) to be displayed.

`- (void)bannerView:(TDBannerView *)bannerView didFailToPresentAdWithError:(NSError *)error`

#### Parameters

`bannerView` | The TDBannerView that failed to present an ad.
`error` | The error that occurred during loading. The error codes are available in TDAdLoader.h.

#### Declared In

`TDBannerViewDelegate.h`

### `– bannerViewWillLeaveApplication:`

Sent when the app will be deactivated or sent to background because the user clicked on an ad and it will be loaded externally in a browser.

`- (void)bannerViewWillLeaveApplication:(TDBannerView *)bannerView`

#### Parameters

`bannerView` | The banner that will leave the application

#### Declared In

`TDBannerViewDelegate.h`