Can Blocks built for the iPhone 4 SDK work when deployed to iPhone OS 3.0?

前端 未结 4 1430
借酒劲吻你
借酒劲吻你 2021-01-19 06:04

The latest Xcode IDE requires you to target iPhone SDK 4 while dynamically handling deprecated and new functionality if you set the application to deploy to earlier releases

4条回答
  •  无人共我
    2021-01-19 06:46

    As far as I know, blocks won't work pre-3.2 because the Blocks runtime is not included (classes like __NSStackBlock__ or whatever). Other than that, my understanding is that you can compile code with blocks if you use a new enough compiler. A solution would be to include a custom blocks runtime conditionally with your project.

提交回复
热议问题