Deprecated ADBannerView Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in iOS 6.0

currentContentSizeIdentifier

A string that identifies the current size of the advertisement displayed in the banner view. (Deprecated in iOS 6.0. Banner views no longer use content size identifiers. See “Content Size Identifiers” for details.)

@property (nonatomic, copy) NSString *currentContentSizeIdentifier
Discussion

Your application should never directly change the size of the banner view. Instead, set the currentContentSizeIdentifier property to a known advertising size. The view is automatically resized to match the new content size. The default value is ADBannerContentSizeIdentifierPortrait.

The identifier placed in the currentContentSizeIdentifier property must be included in the set of identifiers stored in the requiredContentSizeIdentifiers property. This ensures that an advertisement displayed by the view can still be displayed after the view’s size changes. Setting a value not included in the requiredContentSizeIdentifiers property causes an exception to be thrown.

Availability
  • Available in iOS 4.0 and later.
  • Deprecated in iOS 6.0.
Related Sample Code
Declared In
ADBannerView_Deprecated.h

requiredContentSizeIdentifiers

A set of identifiers for the sizes of advertisements that the banner view can display. (Deprecated in iOS 6.0. Banner views no longer use content size identifiers. See “Content Size Identifiers” for details.)

@property(nonatomic, copy) NSSet *requiredContentSizeIdentifiers
Discussion

Banner views must always have dimensions that match the size of a known advertising format. Your application sets the requiredContentSizeIdentifiers property so that the banner view can download advertisements that provide artwork for those sizes. The known sizes are listed in “Content Size Identifiers.” The default value is a set including both ADBannerContentSizeIdentifierPortrait and ADBannerContentSizeIdentifierLandscape.

If the set includes a single identifier, then advertisements downloaded by the banner view have a banner image with that size. If the set includes multiple identifiers, advertisements downloaded by the banner view include images for all sizes specified in the set. This allows the banner view to be resized without having to download additional images. Do not include identifiers for sizes that your application does not use, as it may unnecessarily restrict the inventory of advertisements available to your application.

Setting the requiredContentSizeIdentifiers property does not resize the banner view. To change the size of the banner view, your application sets the currentContentSizeIdentifier property.

Availability
  • Available in iOS 4.0 and later.
  • Deprecated in iOS 6.0.
Declared In
ADBannerView_Deprecated.h

sizeFromBannerContentSizeIdentifier:

Converts a banner content size identifier into its physical size. (Deprecated in iOS 6.0. Banner views no longer use content size identifiers. See “Content Size Identifiers” for details.)

+ (CGSize)sizeFromBannerContentSizeIdentifier:(NSString *)contentSizeIdentifier
Parameters
contentSizeIdentifier

A string that identifies a banner content size. See “Content Size Identifiers” for possible values.

Return Value

The dimensions of that content size in points.

Discussion

The return value differs based on the device your application is running on.

Availability
  • Available in iOS 4.0 and later.
  • Deprecated in iOS 6.0.
Related Sample Code
Declared In
ADBannerView_Deprecated.h