开发者

IPhone SDK - CATextLayer Crash in < 3.2

I have created an app which runs fine on devices using iOS 3.2 or above but on older versions of the OS it crashes with the error

dyld: Symbol not found: _OBJC_CLASS_$_CATextLayer Referenced from: /var/mobile/Applications/70D5888B-B531-484F-997D-776B432FFA52/Test.app/Test Expected in: /System/Library/Frameworks/QuartzCore.framework/QuartzCore

I realize this is because CATextLayer wasn't available before 3.2 but does anyone know what I can do to still make it run in older versions? I have tried checking the version and only calling the layers if it's 3.2+ but the crash seems to happen when it loads in the framework ins开发者_如何学JAVAtead of when it actually tries to change a layer.

Thanks.


weakly link the framework, then check to see if the class exists before using it in your code. There are multiple questions here on how to do that.


Follow the process that I describe in this answer, only weak link the QuartzCore framework in addition to UIKit. It's the same problem the asker was having there, only for a different symbol in a different framework.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜