Menu

ATAdManager (Banner)

The operation extension for Banner ads, providing features such as ad display, checking cache, checking whether the ad is ready, and scenario statistics. It also includes the definition of Extra keys.

Copy
typedef void(^NativeMixBannerViewBlock)(ATNativeBannerView *nativeBannerView);

// Only supports Nend banner
extern NSString *const kATBannerLoadingExtraParameters;
extern NSString *const kATAdLoadingExtraBannerAdSizeKey;  // Default size is 320 * 50
extern NSString *const kATAdLoadingExtraBannerSizeAdjustKey;  // Currently only supports Nend

extern NSString *const kATAdLoadingExtraAdmobBannerSizeKey;  // AdMob adaptive width
extern NSString *const kATAdLoadingExtraAdmobAdSizeFlagsKey;  // AdMob ad size flags

@class ATBannerView;

@interface ATAdManager (Banner)

/// Check whether the Banner ad is ready
/// v5.7.06+
- (BOOL)bannerAdReadyForPlacementID:(NSString *)placementID;

/// Check whether the Banner ad is ready
/// @param send - Whether to send tracking events
- (BOOL)bannerAdReadyForPlacementID:(NSString *)placementID
                             sendTK:(BOOL)send;

/// Get the Banner ad view
/// Note: Returns nil if the ad is not ready
- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID;

/// Get the Banner ad view
/// @param placementID - TopOn placement ID
/// @param extra - Local configuration parameters
/// Note: Returns nil if the ad is not ready
- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID
                                                      extra:(NSDictionary *)extra DEPRECATED_ATTRIBUTE;

/// Get the Banner ad view
/// @param placementID - TopOn placement ID
/// @param scene - Scenario ID
/// Note: Returns nil if the ad is not ready
- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID
                                                      scene:(NSString *)scene;

- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID
                                                     config:(ATShowConfig *)config;

/// Get the Banner ad view
/// @param placementID - TopOn placement ID
/// @param scene - Scenario ID
/// Note: Returns nil if the ad is not ready
- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID
                                                      scene:(NSString *)scene
                                   nativeMixBannerViewBlock:(nullable NativeMixBannerViewBlock)nativeMixBannerViewBlock;

- (nullable ATBannerView *)retrieveBannerViewForPlacementID:(NSString *)placementID
                                                     config:(ATShowConfig *)config
                                   nativeMixBannerViewBlock:(nullable NativeMixBannerViewBlock)nativeMixBannerViewBlock;

/// Get the status object ATCheckLoadModel of the current placement
- (ATCheckLoadModel *)checkBannerLoadStatusForPlacementID:(NSString *)placementID;

/// Query all cache information for the placement
- (nullable NSArray<NSDictionary *> *)getBannerValidAdsForPlacementID:(NSString *)placementID;

/// Record the cache status statistics of the current placement in a business scenario
/// @param scene - Ad scenario
/// v6.2.51+
- (void)entryBannerScenarioWithPlacementID:(NSString *)placementID scene:(NSString *)scene;

@end
Previous
Category
Next
ATAdManager (Interstitial)
Last modified: 2026-07-08Powered by