applicationWillTermminate 正常退出与广告退出 iPhone 问题
是否可以确定应用程序何时关闭,是通过正常方式(主页按钮)还是因为点击广告(本例中的 admob 广告)来完成... Admob 没有任何可以帮助实现此目标的内容它?任何从哪里开始的想法将不胜感激......
Is it possible to determine when an app is closing whether it is done by normal means (home button) or because an ad was clicked (admob ad for this example)... Admob doesn't have anything that would help accomplish this goal does it? Any ideas where to start would be greatly appreciated...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果没有其他/更好的方法可用,请将 UIView 放在广告区域上,检测对其的触摸,做笔记,然后将其传递给下一个响应者(这是广告的视图)。
换句话说,您需要一个可以调用的方法来告诉您 admob 已被单击,以及 UIView 的子类(位于 admod 视图的正上方),它具有以下 TouchBegan:
If no other/better means are available, put a UIView over the ad area, detect touches on it, make a note then pass that to the next responder (which is the ad's view).
In other words, you need a method you can call to tell you that admob was clicked, and a subclass of UIView, which is positioned right over the admod view, that has the following touchesBegan: