CECardAd
Overview
CECardAd is used to integrate ad with predefined layout.
Interface
eventDelegate
eventDelegateDeclaration
@property (nonatomic, weak, nullable) id<CECardADEventDelegate> eventDelegate;Discussion
Delegate which is notified by SDK when CECardAd triggered the ad event.
ad
adDeclaration
@property (nonatomic, strong, readonly, nullable) Ad * ad;Discussion
An Ad object containing data of the loaded ad.
adToken
adTokenDeclaration
@property (nonatomic, strong, readonly, nullable) NSString * adToken;Discussion
A random identifier string generated by SDK.
adUIView
adUIViewDeclaration
@property (nonatomic, strong, readonly, nullable) UIView * adUIView;Discussion
The visual representation of the loaded ad. Supplied after ad is loaded.
coverImagePath
coverImagePathDeclaration
@property (nonatomic, strong, readonly, nullable) NSString * coverImagePath;Discussion
The path to the file of cover image of the loaded ad if the loaded ad has video content.
aspectRatio
aspectRatioDeclaration
@property (nonatomic, assign, readonly) CGFloat aspectRatio;Discussion
The aspect ratio of ad content. (Width / Height)
It would be kCEUnknownAdContentAspectRatio if the ad hasn't loaded.
customEventExtra
customEventExtraDeclaration
@property (nonatomic, strong, readonly, nullable) NSDictionary * customEventExtra;Discussion
Extra from custom event
- initWithVideoViewProfile
- initWithVideoViewProfileDeclaration
- (nonnull instancetype)initWithVideoViewProfile:(CEVideoViewProfile)videoViewProfile;Parameters
name
description
videoViewProfile
profile for customized view. Please check CEVideoViewProfileCardMask for valid flags.
Return Value
A CECardAd instance.
Discussion
init CECardAD with CEVideoViewProfile
- loadAdInstantWithInfo:
- loadAdInstantWithInfo:Declaration
(BOOL)loadAdInstantWithInfo:(nonnull CERequestInfo *)info
error:(NSError **)error;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
(void)loadAdAsyncWithInfo:(nonnull CERequestInfo *)info
reqDelegate:(id<CECardADRequestDelegate>)reqDelegate;Parameters
name
description
info
CERequestInfo instance used to specify the parameters for ad request.
reqDelegate
id<CECardAdRequestDelegate> instance that receive request ad event.
Discussion
Start loading ad content process asynchronously.
- play
- playDeclaration
- (void) play;Discussion
Invoking this method marks the ad as allowed to play. A ad starts when it is both marked as allowed to play and visible to users.
- stop
- stopDeclaration
- (void) stop;Discussion
Invoking this method marks the ad as not allowed to play. A ad stops immediately when stop is invoked and it will never resume until play is invoked.
- mute
- muteDeclaration
- (void) mute;Discussion
Invoking this method turns off the volume of the ad immediately.
- unmute
- unmuteDeclaration
- (void) unmute;Discussion
Invoking this method turns on the volume of the ad immediately.
- isMute
- isMuteDeclaration
- (BOOL) isMute;Return Value
YES if the ad is audible; otherwise, NO;
- hasVideoContent
- hasVideoContentDeclaration
-(BOOL)hasVideoContent;Return Value
YES if it is a video ad; otherwise, NO;
- getTotalFileSize
- getTotalFileSizeDeclaration
- (long long)getTotalFileSize;Return Value
The total size of the creative files downloaded for this ad.
Last updated