Weak linking UIPopoverBackgroundView

邮差的信 提交于 2020-01-03 04:30:13

问题


I have a project that has to be deployed to 4.0 but has some features that are 5.0 only, such as UI customization.

I want my UIPopoverBackgroundView subclass to be weak linked, but I always get the following error when launching on 4.X devices

        dyld: Symbol not found: _OBJC_CLASS_$_UIPopoverBackgroundView

I can't use the NS_CLASS_AVAILABLE macro since my custom Background of the popover is a subclass of the UIPopoverBackgroundView class, so it has to be declared in a .h . How can I weak link only part of UIKit? Or is there any other way around this issue?

Thanks to all


回答1:


After a lot of googling, turns out that Marco had the answer...

http://www.marco.org/2010/11/22/supporting-older-versions-of-ios-while-using-new-apis



来源:https://stackoverflow.com/questions/11428675/weak-linking-uipopoverbackgroundview

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