GoogleMobileAds Framework Reference

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

    Objective-C

    externGADAdSizeGADAdSizeFromCGSize(CGSizesize)
  • Returns a custom GADAdSize that spans the full width of the application in portrait orientationwith the height provided.

    Declaration

    Objective-C

    externGADAdSizeGADAdSizeFullWidthPortraitWithHeight(CGFloatheight)
  • Returns a custom GADAdSize that spans the full width of the application in landscape orientationwith the height provided.

    Declaration

    Objective-C

    externGADAdSizeGADAdSizeFullWidthLandscapeWithHeight(CGFloatheight)
  • Returns YES if the two GADAdSizes are equal, otherwise returns NO.

    Declaration

    Objective-C

    externBOOLGADAdSizeEqualToSize(GADAdSizesize1,GADAdSizesize2)
  • Returns a CGSize for the provided a GADAdSize constant. If the GADAdSize is unknown, returnsCGSizeZero.

    Declaration

    Objective-C

    externCGSizeCGSizeFromGADAdSize(GADAdSizesize)
  • Returns YES if |size| is one of the predefined constants or is a custom GADAdSize generated byGADAdSizeFromCGSize.

    Declaration

    Objective-C

    externBOOLIsGADAdSizeValid(GADAdSizesize)
  • Returns YES if |size| is a fluid ad size.

    Declaration

    Objective-C

    externBOOLGADAdSizeIsFluid(GADAdSizesize)
  • Returns a NSString describing the provided GADAdSize.

    Declaration

    Objective-C

    externNSString*_NonnullNSStringFromGADAdSize(GADAdSizesize)
  • Returns an NSValue representing the GADAdSize.

    Declaration

    Objective-C

    externNSValue*_NonnullNSValueFromGADAdSize(GADAdSizesize)
  • Returns a GADAdSize from an NSValue. Returns kGADAdSizeInvalid if the value is not a GADAdSize.

    Declaration

    Objective-C

    externGADAdSizeGADAdSizeFromNSValue(NSValue*_Nonnullvalue)
  • 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.

    Declaration

    Objective-C

    externGADAdSizeGADClosestValidSizeForAdSizes(GADAdSizeoriginal,NSArray<NSValue*>*_NonnullpossibleAdSizes)

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.