是否有可能確定應用程序關閉時是通過常規方式完成(主頁按鈕)還是因爲廣告被點擊(本例中的admob廣告)...... Admob doesn沒有什麼能夠幫助實現這個目標嗎?任何想法從哪裏開始將不勝感激...applicationWillTerminate正常退出與廣告退出iPhone問題
2
A
回答
2
如果沒有其他/更好的方法可用,將UIView放在廣告區域,檢測觸摸,做一個筆記,然後將其傳遞給下一個響應者是廣告的觀點)。
換句話說,你需要一個方法,你可以打電話告訴你單擊的AdMob和UIView的,這是對在admod視圖定位的一個子類,它具有以下的touchesBegan:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
// you may want to do some extra work here to detect whether the touch is a
// touchUp in the view, vs. a touchUpOutside which is not the same. It all
// depends on how admob treats touches. If it immediately quits your app on
// touchdown, then you call your method immediately. If admob waits to see
// if there is a touchUp in its view, then you need to detect the same and
// call your method after that. Play around to see what you need to mimic.
[self adViewHasBeenTouched];
// The following is needed to let admob get the touch, after you are done
// with your method.
[self.nextResponder touchesBegan:touches withEvent:event];
}
相關問題
- 1. 退出AdMob廣告
- 2. 退出按鈕退出後的問題
- 3. Facebook退出問題
- 4. 谷歌廣告ID退出機制
- 5. iPhone SDK退出
- 6. 退出在iPhone
- 7. Java - 正常退出線程
- 8. 進程正常退出
- 9. 關於退出和退貨的問題?
- 10. Firefox後退按鈕無法與谷歌廣告正常工作
- 11. 正在退出的聲音問題
- 12. Android退出AsyncTask問題
- 13. 退出按鈕問題
- 14. 線程退出問題
- 15. 退出Jmeter的問題
- 16. Django的退出問題
- 17. 廣播消息退出(MPI)
- 18. LLDB - 退出...退出?
- 19. 退出嘗試與退出子
- 20. 退出與退出之間的區別
- 21. 異常處理 - 正常退出
- 22. 退出時出現異常
- 23. 如何在出現admob廣告時顯示退出按鈕?
- 24. 進程退出問題線程未成功退出
- 25. 退出時出現SystemExit和NameError問題
- 26. 正確退出iphone應用程序
- 27. iPhone「轉到背景」與「退出」混淆
- 28. 中斷/退出/退出SAS
- 29. Bash退出不退出
- 30. 如何退出退出?
已經報道了這個問題的多個重複。 *不*重新發布;如果您需要澄清,請編輯* this *問題。 – 2009-10-23 15:49:51