Menu

ATNativeADRenderer

Copy
@protocol ATNativeADRenderer<NSObject>
/**
 May return nil.
 */
-(__kindof UIView*)createMediaView;

/**
 Renders the assets onto the associated ad view. Implementers implement this method in a network-specific manner.
 */
-(void)renderOffer:(ATNativeADCache*)offer;

/**
 * Whether the rendered ad is a video ad.
 */
-(BOOL)isVideoContents;

/**
 * Duration of the video ad playback, in milliseconds.
 */
- (CGFloat)videoPlayTime;

/**
 * Total duration of the video ad, in milliseconds.
 */
- (CGFloat)videoDuration;

/**
 * Play mute switch
 * @param flag Whether to mute
 */
- (void)muteEnable:(BOOL)flag;

/**
 * Play the video ad
 */
- (void)videoPlay;

/**
 * Pause the video ad
 */
- (void)videoPause;

/// Destroy the network native ad
- (void)destroyNative;

- (ATNativeAdType)getNativeAdType;

- (ATNativeAdRenderType)getCurrentNativeAdRenderType;

/**
 * Clear the ad cache
 */
-(void)clearAdCache;

/// Used to bind customEvent
- (void)bindCustomEvent;

/**
 * Set the AdChoicesView background color for self-rendering ads.
 * @param color View color
 */
- (void)setAdChoicesViewColor:(UIColor *)color;

/**
 * This reference should be kept as a weak reference, because the ad view strongly references its renderer.
 * This property was added so that the renderAssets: method can directly access it.
 */
@property(nonatomic, weak) ATNativeADView *ADView;

@end
Previous
ATNativeADDelegate
Next
ATRewardedVideoDelegate
Last modified: 2026-07-08Powered by