CENativeAd
Overview
CENativeAd is used to request and manage native ad, which contains many parameters for building custom UI with CEMediaView.
Interface
placement
placementDeclaration
@property (nonatomic, copy, readonly, nonnull) NSString * placement;Discussion
Placement id which is used to require ad.
title
titleDeclaration
@property (nonatomic, copy, readonly, nullable) NSString * title;Discussion
An optional string describing the title of the native ad.
subTitle
subTitleDeclaration
Discussion
An optional string describing the subtitle of the native ad.
callToAction
callToActionDeclaration
Discussion
An optional string describing the call to action slogan of the native ad. This is usually used to decorate the call-to-action button.
icon
iconDeclaration
Discussion
A CEAdImage object, which is used to get the icon image of the native ad.
body
bodyDeclaration
Discussion
An optional string describing the main description of the native ad.
adToken
adTokenDeclaration
Discussion
A random identifier string generated by SDK.
eventDelegate
eventDelegateDeclaration
Discussion
Delegate which is notified by SDK when CENativeeAd triggered the ad event.
ad
adDeclaration
Discussion
An Ad object containing data of the loaded ad.
coverImagePath
coverImagePathDeclaration
Discussion
The path to the file of the cover image of the loaded ad if the loaded ad has video content.
- registerViewForInteraction:withViewController:
- registerViewForInteraction:withViewController:Declaration
Parameters
name
description
view
A widget used to handle tap gesture for ad engagement.
viewController
The view controller containing the view parameter.
Discussion
This method is used to register custom widget for ad engagement. SDK add a tag gesture recognizer to view passed in to redirect user to langing page.
- registerViewForInteraction:withViewController:withClickableViews:
- registerViewForInteraction:withViewController:withClickableViews:Declaration
Parameters
name
description
view
The container view for widgets.
viewController
The view controller containing the view parameter.
clickableViews
Widgets to handle ad engagement.
Discussion
This method is used to register a series of custom widgets for ad engagement. SDK add tag gesture recognizers to clickableViews passed in to redirect users to langing page.
- loadAdInstantWithInfo:
- loadAdInstantWithInfo:Declaration
Parameters
name
description
info
CERequestInfo instance used to specify the parameters for ad request.
error
NSError instance used to specify the error for ad request.
Discussion
Start loading ad content process synchronously, and it will ignore the timeout in CERequestInfo.
- loadAdAsyncWithInfo:
- loadAdAsyncWithInfo:Declaration
Parameters
name
description
info
CERequestInfo instance used to specify the parameters for ad request.
reqDelegate
id<CENativeAdRequestDelegate> instance that receive request ad event.
Discussion
Start loading ad content process asynchronously.
[CENativeAdRequestDelegate nativeAdDidLoad:] is invoked if an ad is ready before timeout; otherwise, [CENativeAdRequestDelegate nativeAd:didFailWithError:] is invoked.
- hasVideoContent
- hasVideoContentDeclaration
Return Value
YES if the loaded ad is a video ad; otherwise, NO;
- getTotalFileSize
- getTotalFileSizeDeclaration
Return Value
The total size of the creative files downloaded for this ad.
Last updated