GoogleMobileAds Framework Reference Stay organized with collections Save and categorize content based on your preferences.
Functions
The following functions are available globally.
Returns a custom GADAdSize for the provided CGSize. Use this only if you require a non-standardsize. Otherwise, use one of the standard size constants above.
Declaration
Swift
funcGADAdSizeFromCGSize(_size:CGSize)->GADAdSizeReturns a custom GADAdSize that spans the full width of the application in portrait orientationwith the height provided.
Declaration
Swift
funcGADAdSizeFullWidthPortraitWithHeight(_height:CGFloat)->GADAdSizeReturns a custom GADAdSize that spans the full width of the application in landscape orientationwith the height provided.
Declaration
Swift
funcGADAdSizeFullWidthLandscapeWithHeight(_height:CGFloat)->GADAdSize
Returns a CGSize for the provided a GADAdSize constant. If the GADAdSize is unknown, returnsCGSizeZero.
Declaration
Swift
funcCGSizeFromGADAdSize(_size:GADAdSize)->CGSizeReturns YES if |size| is one of the predefined constants or is a custom GADAdSize generated byGADAdSizeFromCGSize.
Declaration
Swift
funcIsGADAdSizeValid(_size:GADAdSize)->BoolReturns YES if |size| is a fluid ad size.
Declaration
Swift
funcGADAdSizeIsFluid(_size:GADAdSize)->BoolReturns a NSString describing the provided GADAdSize.
Declaration
Swift
funcNSStringFromGADAdSize(_size:GADAdSize)->StringReturns an NSValue representing the GADAdSize.
Declaration
Swift
funcNSValueFromGADAdSize(_size:GADAdSize)->NSValueReturns a GADAdSize from an NSValue. Returns kGADAdSizeInvalid if the value is not a GADAdSize.
Declaration
Swift
funcGADAdSizeFromNSValue(_value:NSValue)->GADAdSize
Returns the closest valid ad size from possibleAdSizes as compared to |original|. The selectedsize must be smaller than or equal in size to the original. The selected size must also bewithin a configurable fraction of the width and height of the original. If no valid size exists,returns kGADAdSizeInvalid.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-03-03 UTC.