现在的位置: 首页 > 综合 > 正文

iAd框架中几个响应事件

2018年01月08日 ⁄ 综合 ⁄ 共 2035字 ⁄ 字号 评论关闭

ADBannerView 

原文

// This
method is invoked each time a banner loads a new advertisement.

// Once
a banner has loaded an ad, it will display that ad until another ad is available.

// The
delegate might implement this method if it wished to defer placing the banner in a view        hierarchy until the banner has content to display.  



翻译 
// 当每次新加载一个广告横幅时调用此方法。
// 当一个广告条加载了一个广告横幅,它就会一直显示,直到新的广告横幅加载完成。
// 如果想让广告条在内容加载完成后才在层次结构的视图中显示出来,可以通过委托方式来实现此方法。


  - (void)bannerViewDidLoadAd:(ADBannerView *)banner;  


==================================================== 


原文
// This
method will be invoked when an error has occurred attempting to get advertisement content. 

// The
ADError enum lists the possible error codes.  



翻译
// 广告内容如果发生错误时,这个方法将被调用。
// 该ADError枚举列出了可能的错误代码。  


- (void)bannerView:(ADBannerView *)banner
didFailToReceiveAdWithError:(
NSError *)error;  
====================================================  


原文
// This
message will be sent when the user taps on the banner and some action is to be taken.

// Actions
either display full screen content in a modal session or take the user to a different application.

// The
delegate may return NO to block the action from taking place, but this should be avoided if possible because most advertisements pay significantly more when the action takes place and, over the longer term, repeatedly blocking actions will decrease the ad
inventory available to the application.

// Applications
may wish to pause video, audio, or other animated content while the  advertisement's action executes.



翻译
//  当用户点击banner上或者采取了一些操作,这个信息被发送。
//  动作执行后,要么在一个模式会话内全屏显示,或者让用户切换到不同的应用程序中。 
//  这个委托方法可以返回NO来组织这些动作的发生,但是这应该尽量避免,因为大多数广告在动作明显发生时支付得更多,并且在较长的时间内,如果拦截动作多次出现的话,将减少广告资源提供给应用程序。 
//  当广告操作执行时,可能希望应用程序的视频,声音,或者其他的动画内容都暂停。  


- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner
willLeaveApplication:(BOOL)willLeave; 

===================================================  


原文
// This
message is sent when a modal action has completed and control is returned to the          application. 

// Games,
media playback, and other activities that were paused in response to the beginning of the action should resume at this point.


翻译

// 当一个行为模式完成后或者控制权返回给应用程序时发送一个信息。

// 通过该事件的响应开始从断点恢复游戏,媒体的播放,和其他的活动。


- (void)bannerViewActionDidFinish:(ADBannerView *)banner;

【上篇】
【下篇】

抱歉!评论已关闭.