Are Apps using iAd compatible with older iOS

[亡魂溺海] 提交于 2019-11-27 06:27:58

问题


Can I add the UIBannerViewDelegate protocol to my UIViewController subclass while remaining compatible with pre-iOS 4 devices?

This is NOT a duplicate, the question is specifically related to the delegate protocol.


回答1:


If you weak-link the iAd framework, you will encounter no issues with a controller class that conforms to the ADBannerViewDelegate protocol. You will, of course, need to add the ADBannerView programmatically (if it exists on the running OS) or otherwise load a different Nib file for 3.x vs. 4.x.

Even though there is no ADBannerViewDelegate protocol in iPhone OS 3.x, I just tested and no errors are thrown for missing symbols if a class that conforms to it is loaded in that older OS.



来源:https://stackoverflow.com/questions/3128457/are-apps-using-iad-compatible-with-older-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!