开发者

Check for availability of blocks at runtime on iOS

开发者 https://www.devze.com 2023-01-26 05:34 出处:网络
I need to test for the availability of blocks at runtime, so I can handle backwards compatibility with iOS 3. Any tips?

I need to test for the availability of blocks at runtime, so I can handle backwards compatibility with iOS 3. Any tips?

edit: So far I'm doin开发者_开发百科g if (!NSClassFromString(@"NSBlockOperation")) {...} Seems to be working...


You will also need to make sure to weak link the libSystem.B.dylib, set your base SDK to 4.0 and deployment target to 3.1.3, as described here.

A good overview on how to deal with iOS versioning issues can also be found in this this Cocoa with Love article: Tips & Tricks for conditional iOS3, iOS3.2 and iOS4 code

0

精彩评论

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