iOS 4.0 之前的平台支持Block方法

如果是Mac 10.6 或 iOS 4.0 之前的平台可以利用 http://code.google.com/p/plblocks/ 這個project得以支援Block語法。

=======

Installation & Use

Plausible Blocks is composed of two pieces:

  • Plausible Blocks SDK: Supplies custom compilers for use in Xcode.
  • PLBlocks Runtime: A runtime library required by all applications making use of Plausible Blocks.

To install the SDK, simply install the included “Plausible Blocks SDK” package. Once installed, an additional “GCC 4.2 (Plausible Blocks)” compiler will be available for selection in your Xcode project and targets. To build with the new compiler, simply select in either your project’s build settings, or on a per-target basis:

 

In addition to the SDK, you’ll need to include the PLBlocks runtime framework in your application. It is provided as an embeddable framework for Mac OS X, and as a static framework for iPhone applications.

To include in your project:

  1. Copy the Mac OS X or iPhone PLBlocks.framework to your project directory
  2. Within Xcode, select “Add -> Existing frameworks” and add the copied PLBlocks.framework to your project.
  3. Ensure that PLBlocks.framework has been added to your targets “Link Binary With Libraries” section.
  4. (Mac OS X Only) Add a new “Copy Files” build phase to copy PLBlocks.framework to your application’s “Framework” directory.
  5. Set the project, or a specific target, to use the “GCC 4.2 (Plausible Blocks)” compiler.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值