简体   繁体   English

使用游戏控制器关闭iAd插页式广告

[英]Close iAd interstitial with a Game Controller

I'm making a Sprite Kit game that fully supports wireless game controllers. 我正在制作一个完全支持无线游戏控制器的Sprite Kit游戏。

Using one means you won't always be able to touch your screen for some little actions. 使用“一个”意味着您将无法始终通过触摸屏进行一些小动作。 (For example, if you use an iPad as a TV game console with an HDMI cable and a game controller playing from a couch) (例如,如果您使用iPad作为具有HDMI电缆和从沙发上玩游戏控制器的电视游戏机)

On a stage of adding ads to the game, I stumbled on this question: 在向游戏添加广告的阶段,我偶然发现了这个问题:

Is there any way at all to close iAd interstitial with a MFi Game Controller? 是否可以通过MFi游戏控制器关闭iAd插页式广告?

I guess, there is no way. 我想那是不可能的。 I decided to not show any ads when using a wireless game controller. 我决定在使用无线游戏控制器时不显示任何广告。

You probably can't do this with: 您可能无法通过以下方式执行此操作:

[UIViewController requestInterstitialAdPresentation];

You would need to present the ad yourself using a solution based around ADInterstitialAd and it's presentInView: method. 您可能需要使用基于ADInterstitialAd的解决方案及其ADInterstitialAd presentInView:方法来展示广告。 Ie create a custom UIViewController , you then have full control. 即创建一个自定义UIViewController ,您便拥有完全的控制权。

The requestInterstitialAdPresentation solution is for simple situations, if you need more you need to build it yourself. requestInterstitialAdPresentation解决方案仅适用于简单情况,如果您需要更多解决方案,则需要自己构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM