Menu

ATNativeRenderer

Native renderer class, responsible for managing and rendering the view components of native ads. Provides multiple display forms such as media views, shake views, and slide views, and supports video playback control.

Copy
@class ATNativeADCache;
NS_ASSUME_NONNULL_BEGIN
@protocol ATNativeADRenderer;

@interface ATNativeRenderer : NSObject<ATNativeADRenderer>

// Get the ad view
-(UIView*)retriveADView;

// Record the custom player status and current playback time
- (void)recordCustomPlayerStatus:(ATPlayerStatus)status currentTime:(NSTimeInterval)time;

// Initialize the renderer with configuration and ad view
-(instancetype) initWithConfiguraton:(ATNativeADConfiguration*)configuration adView:(ATNativeADView*)adView;

// Create the media view
-(__kindof UIView*)createMediaView;

// Ad view (weak reference)
@property(nonatomic, weak) ATNativeADView *ADView;

// Ad configuration (read-only)
@property(nonatomic, readonly) ATNativeADConfiguration *configuration;

// Get the network media view
- (UIView *)getNetWorkMediaView;

// Get the network shake view
- (UIView *)getNetWorkShakeView:(ATNativeADCache *)offer frame:(CGRect)frame;

// Get the network slide view
- (UIView *)getNetworkSlideViewWithOffer:(ATNativeADCache *)offer 
                                  frame:(CGRect)frame 
                                repeat:(int)repeat 
                        animationWidth:(CGFloat)animationWidth 
                       animationHeight:(CGFloat)animationHeight;

// The following methods are for subclass override
// Close action
- (void)closeAct;

// Set video auto-play type
- (void)setVideoAutoPlay:(NSInteger)autoPlayType;

// Destroy the shake view
- (void)shakeViewDestroy:(UIView *)shakeView;

@end
Previous
ATNativePrepareInfo
Next
ATNativeSelfRenderView
Last modified: 2026-07-08Powered by