GDTNativeExpressAdView.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //
  2. // GDTNativeExpressAdView.h
  3. // GDTMobApp
  4. //
  5. // Created by michaelxing on 2017/4/14.
  6. // Copyright © 2017年 Tencent. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "GDTAdProtocol.h"
  10. @interface GDTNativeExpressAdView : UIView <GDTAdProtocol>
  11. /**
  12. * 是否渲染完毕
  13. */
  14. @property (nonatomic, assign, readonly) BOOL isReady;
  15. /**
  16. * 是否是视频模板广告
  17. */
  18. @property (nonatomic, assign, readonly) BOOL isVideoAd;
  19. /**
  20. * viewControllerForPresentingModalView
  21. * 详解:[必选]开发者需传入用来弹出目标页的ViewController,一般为当前ViewController
  22. */
  23. @property (nonatomic, weak) UIViewController *controller;
  24. /**
  25. * 广告是否有效,以下情况会返回NO,建议在调用render之前判断,当为NO时render失败
  26. * a.广告过期
  27. */
  28. @property (nonatomic, readonly) BOOL isAdValid;
  29. /**
  30. *[必选]
  31. *原生模板广告渲染
  32. */
  33. - (void)render;
  34. /**
  35. * 视频模板广告时长,单位 ms
  36. */
  37. - (CGFloat)videoDuration;
  38. /**
  39. * 视频模板广告已播放时长,单位 ms
  40. */
  41. - (CGFloat)videoPlayTime;
  42. /**
  43. 返回广告的eCPM,单位:分
  44. @return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
  45. */
  46. - (NSInteger)eCPM;
  47. /**
  48. 返回广告的eCPM等级
  49. @return 成功返回一个包含数字的string,@""或nil表示无权限或后台异常
  50. */
  51. - (NSString *)eCPMLevel;
  52. /**
  53. * S2S bidding 竞胜之后调用, 需要在调用广告 show 之前调用
  54. * @param eCPM - 曝光扣费, 单位分,若优量汇竞胜,在广告曝光时回传,必传
  55. * 针对本次曝光的媒体期望扣费,常用扣费逻辑包括一价扣费与二价扣费,当采用一价扣费时,胜者出价即为本次扣费价格;当采用二价扣费时,第二名出价为本次扣费价格.
  56. */
  57. - (void)setBidECPM:(NSInteger)eCPM;
  58. @end