GADAdLoader.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // GADAdLoader.h
  3. // Google Mobile Ads SDK
  4. //
  5. // Copyright 2015 Google Inc. All rights reserved.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import <UIKit/UIKit.h>
  9. #import "GADAdLoaderDelegate.h"
  10. #import "GADRequest.h"
  11. #import "GADRequestError.h"
  12. /// Loads ads. See GADAdLoaderAdTypes.h for available ad types.
  13. @interface GADAdLoader : NSObject
  14. /// Object notified when an ad request succeeds or fails. Must conform to requested ad types'
  15. /// delegate protocols.
  16. @property(nonatomic, weak) id<GADAdLoaderDelegate> delegate;
  17. /// Returns an initialized ad loader configured to load the specified ad types.
  18. ///
  19. /// @param rootViewController The root view controller is used to present ad click actions. Cannot
  20. /// be nil.
  21. /// @param adTypes An array of ad types. See GADAdLoaderAdTypes.h for available ad types.
  22. /// @param options An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil to
  23. /// use default options. See each ad type's header for available GADAdLoaderOptions subclasses.
  24. - (instancetype)initWithAdUnitID:(NSString *)adUnitID
  25. rootViewController:(UIViewController *)rootViewController
  26. adTypes:(NSArray *)adTypes
  27. options:(NSArray *)options;
  28. /// Loads the ad and informs the delegate of the outcome.
  29. - (void)loadRequest:(GADRequest *)request;
  30. @end
  31. /// Ad loader options base class. See each ad type's header for available GADAdLoaderOptions
  32. /// subclasses.
  33. @interface GADAdLoaderOptions : NSObject
  34. @end