ADBannerView class provides a view that displays banner advertisements to the user. When the user taps a banner view, the view triggers an action programmed into the advertisement. For example, an advertisement might show a movie, present a modal advertisement, or launch Safari to show a webpage. Your application is notified when an action starts and stops, but does not otherwise interact with the advertisement. You receive revenue when users see new advertisements or trigger their actions.
- iOS 4.0–10.0Deprecated
The banner view’s delegate is called when a banner view cycles to show a new advertisement as well as when the user interacts with the banner view. For example, your delegate typically pauses your application’s activities when a user taps an advertisement and restores those activities when the user finishes interacting with the advertisement.
A banner view must always use one of the standard sizes defined in Content Size Identifiers. This is to ensure that the advertisement is drawn correctly. You configure the banner view’s
requiredContentSizeIdentifiers property with the set of possible sizes your view is allowed to use in your application. To change the size of the banner view, do not set the bounds directly; instead set the
currentContentSizeIdentifier property to one of the size identifiers included in that set. You can retrieve the actual dimensions that a particular identifier equates to on a specific device by calling the
sizeFromBannerContentSizeIdentifier: class method.
ADBannerView class provides a self-contained view. Your application should not subclass
ADBannerView, nor should your application attempt to change the behavior of the banner view. For example, your application should never add subviews to a banner view.