Skip to content
On this page

开屏广告

*开屏广告回调说明

///广告加载成功
- (void)juHeBaoSplashAdLoadSuccess:(nonnull JuHeBaoSplashAd *)splashAd;

///广告加载失败
- (void)juHeBaoSplashAdLoadFail:(nonnull JuHeBaoSplashAd *)splashAd error:(JuHeBaoAdError * _Nullable)error;

///开屏广告点击回调
- (void)juHeBaoSplashAdDidClick:(nonnull JuHeBaoSplashAd *)splashAd;

///开屏广告关闭回调
- (void)juHeBaoSplashAdDidClose:(nonnull JuHeBaoSplashAd *)splashAd closeType:(JuHeBaoSplashAdCloseType)closeType;

///开屏广告展示
- (void)juHeBaoSplashAdDidShow:(nonnull JuHeBaoSplashAd *)splashAd;

///开屏广告渲染失败
- (void)juHeBaoSplashAdRenderFail:(nonnull JuHeBaoSplashAd *)splashAd error:(JuHeBaoAdError * _Nullable)error;

///开屏广告渲染成功
- (void)juHeBaoSplashAdRenderSuccess:(nonnull JuHeBaoSplashAd *)splashAd;

///广告关闭回调
- (void)juHeBaoSplashAdViewControllerDidClose:(nonnull JuHeBaoSplashAd *)splashAd;

*开屏广告使用示例
广告加载
1.Objective-C

- (void)loadSplashAd {
    JuHeBaoSplashAd *juHeBaoSplashAd = [[JuHeBaoSplashAd alloc] init];
    juHeBaoSplashAd.slotID = @"";
    juHeBaoSplashAd.delegate = self;
    juHeBaoSplashAd.tolerateTimeout = 4;

    [juHeBaoSplashAd loadJuHeBaoAdData];
}

2.Swift

let juHeBaoSplashAd = JuHeBaoSplashAd()
    func loadSplashAd(){
        self.juHeBaoSplashAd.slotID = ""
        self.juHeBaoSplashAd.delegate = self
        self.juHeBaoSplashAd.tolerateTimeout = 4


        self.juHeBaoSplashAd.loadJuHeBaoAdData()
    }

广告展示
1.Objective-C

[self.juHeBaoSplashAd showSplashViewInRootViewController:rootViewController];

2.Swift

self.juHeBaoSplashAd.showSplashView(inRootViewController: rootViewController)