在编辑文本字段时,我将屏幕向上移动以调出键盘,但是当我在屏幕打开时单击 iAd 时,当我关闭广告时,屏幕会下降,键盘会保持不变,因此当我隐藏键盘时,屏幕也会保持不变下降更多,所以所有内容都下降了半个屏幕。我该如何解决这个问题?我想如果我能识别出 iAd 被点击的时间,我就可以保持屏幕向上。
最佳答案
我不确定是否有回调/委托(delegate)方法可供应用程序了解 iAD 中用户的触摸。
这是苹果对此的说法,
If the banner view covered your application’s user interface, it calls the delegate’s bannerViewActionDidFinish: method after the interface is restored.
if your interface was covered by the banner view, your application could still be moved into the background later, either because the advertisement launched another application or because the user chose to do so. In all cases, if your user interface was covered by the banner view, it is uncovered and your delegate’s bannerViewActionDidFinish: is invoked before your application moves to the background. Because the application may be moving into the background, your delegate should return quickly from its bannerViewActionDidFinish: method.
关于ios - 如何知道用户是否触摸了iAd?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18755748/