插屏样式接入说明


  • 插屏样式的示例效果

  • 插屏的使用介绍

      在对应的文件中#import MMUInterstitials.h” (确认对应的.a文件也已经引入工程)

    • MMUBanners的创建和初始化示例代码:

      self.mInterstitials = [[MMUInterstitials alloc] initInterstitialWithSlotID:@"Your slot ID" isManualRefresh:NO delegate:self borswerDelegate:self];
      
    • MMUInterstitials主要属性说明:

      //插屏对象的代理
      @property (nonatomic, weak, readonly) id<MMUInterstitialDelegate> delegate;      
      //点击插屏弹出界面的行为代理
      @property (nonatomic, weak, readonly) id<MMUBrowserDelegate> browserDelegate;    
      //标签信息,SDK会将信息传给AFP服务器,一般用于辅助创意定向。
      @property (nonatomic, copy) NSString *mTags;
      
    • MMUInterstitials接口方法的使用,以下是几种常用的组合。

      • 加载插屏并在加载成功后展示;加载开始之后展示之前可以取消展现

        - (void)interstitialLoadAndShow;//加载并展现
        - (void)interstitialCancel;//取消展现
        
      • 加载后并不是立即展现,而是调用展现方法后才展现

        - (void)interstitialLoad;//插屏加载方法
        - (void)showInterstitial;//插屏展现方法
        
      • 主动关闭插屏的方法(目前支持平台:阿里妈妈)

        - (void)closeInterstitial;
        
    • MMUInterstitialDelegate的方法集合

      //插屏所需viewController,必须实现
      - (UIViewController *)viewControllerForPresentingInterstitialModalView;
      //插屏请求成功
      - (void)interstitialRequestAdSuccess;
      //插屏请求成功失败   
      - (void)interstitialFailWithError:(NSError *)error;
      //插屏创意展现的回调
      - (void)interstitialAdDidPresent;
      //插屏创意被点击的回调
      - (void)interstitialAdClick;
      //插屏被关闭的回调
      - (void)interstitialViewClose;
      

      更多用法请参考随SDK发布的DEMO项目中关于插屏的使用,插屏隐藏接口请参考平台适配和自定义平台中平台适配的相关说明。

powered by Gitbook该文件修订时间: 2016-10-28 17:58:48