【发布时间】:2021-09-09 15:37:10
【问题描述】:
我希望在展示插页式广告之前先显示一个屏幕(非交互式)以显示几秒钟。 目前,我的插页式广告是使用方法调用的
[self showStartupAd];
这表明了这一点;这当然会显示广告。
-(void)showStartupAd{
UIViewController *rootController = self.window.rootViewController;
[IronSource showInterstitialWithViewController:rootController placement:0];
}
但是,我想显示一个基本计时器,例如,显示 5 秒,首先启动的活动视图或某种指示器,它允许用户看到一个简短的文本(例如“赞助广告加载' 然后有一个方法用于计时器何时结束/视图关闭,然后显示广告(然后我可以在广告回调中处理其余部分)。
我当然可以得到这样的进度视图;
UIViewController *rootController = self.window.rootViewController;
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
indicator.frame = CGRectMake(0.0, 0.0, 140.0, 140.0);
indicator.center = rootController.view.center;
[rootController.view addSubview:indicator];
[indicator bringSubviewToFront:rootController.view];
[UIApplication sharedApplication].networkActivityIndicatorVisible = TRUE;
[indicator startAnimating];
但这并没有显示任何我可以自定义/使用回调的屏幕。
【问题讨论】:
标签: ios objective-c