摘要:
Declaring a Block Reference (声明一个block引用)
Block variables hold references to blocks. You declare them using syntax similar to that you use to declare a pointer to a function, except that you use ^ instead of *. The block type fully interoperates with the rest of the C type system. The following are all valid block variable declarations:
block变量维持了一个对block的引用。你声明block使用了和声明函数指针相同的语法,除了你使用“^”代替了“*”之外。block类型可以和全部C类型系统相互操作。下列都是block变量的声明: 阅读全文
摘要:
Conceptual Overview(概览)
Block objects provide a way for you to create an ad hoc function body as an expression in C, and C-derived languages such as Objective-C and C++. In other languages and environments, a block object is sometimes also called a “closure”. Here, they are typically referred to colloquially as “blocks”, unless there is scope for confusion with the standard C term for a block of code. 阅读全文
摘要:
Getting Started with Blocks(开始block)
The following sections help you to get started with blocks using practical examples. 阅读全文
摘要:
Introduction(介绍)
Block objects are a C-level syntactic and runtime feature. They are similar to standard C functions, but in addition to executable code they may also contain variable bindings to automatic (stack) or managed (heap) memory. A block can therefore maintain a set of state (data) that it can use to impact behavior when executed. 阅读全文
摘要:
今天是2015年9月9日,我整理了空置了4年的博客园账户,重新出发~ 阅读全文