使用iAd的应用程序是否与旧iOS兼容 [英] Are Apps using iAd compatible with older iOS
问题描述
我可以将UIBannerViewDelegate协议添加到我的UIViewController子类中,同时保持与iOS 4之前的设备兼容吗?
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.
推荐答案
如果您弱化链接iAd框架,您将不会遇到符合控制器类的问题ADBannerViewDelegate协议。当然,您需要以编程方式添加ADBannerView(如果它存在于正在运行的操作系统上)或以其他方式为3.x与4.x加载不同的Nib文件。
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.
即使iPhone OS 3.x中没有ADBannerViewDelegate协议,我刚刚测试过,如果在旧版操作系统中加载了符合它的类,则不会丢失错误符号。
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.
这篇关于使用iAd的应用程序是否与旧iOS兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!