<GANSearchAdControllerDelegate> Protocol

<GANSearchAdControllerDelegate> Protocol Reference

Overview

A protocol for GANSearchAdController to inform a delegate that new ads have been loaded or that they have failed to load.

Typically, the client of the SDK will provide the delegate.

Inherits <NSObject>.

Instance Method Summary

(void) - searchAdController:didLoadAds:
 Notifies the GANSearchAdControllerDelegate that numberOfAds new ads have been loaded and are therefore now available. More...
 
(void) - searchAdController:didFailWithError:
 Notifies the GANSearchAdControllerDelegate that ads have failed to load. More...
 
(void) - externalLinkDidOpen
 Callback to inform a delegate if url was clicked and the link was opened in a browser. More...
 

Method Detail

- (void) searchAdController: (GANSearchAdController *)  adController
didLoadAds: (NSInteger)  numberOfAds 
optional

Notifies the GANSearchAdControllerDelegate that numberOfAds new ads have been loaded and are therefore now available.

Notes:

  • this method may be called several times after calling loadAds:, if the server has several pages of ads for a given query.
  • if there are no additional ads in the server, this method will return 0 for numberOfAds (this is not an error).
    Parameters
    adControllerThe GANSearchAdController that the ads were requested from.
    numberOfAdsThe number of ads that have been loaded. This is not cumulative.
- (void) searchAdController: (GANSearchAdController *)  adController
didFailWithError: (NSError *)  error 
optional

Notifies the GANSearchAdControllerDelegate that ads have failed to load.

Parameters
adControllerThe GANSearchAdController that the ads were requested from.
errorThe error returned from the ad request.
- (void) externalLinkDidOpen
optional

Callback to inform a delegate if url was clicked and the link was opened in a browser.