摘要: 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变量的声明: 阅读全文
posted @ 2015-09-09 11:08 真高兴 阅读(341) 评论(0) 推荐(2) 编辑
摘要: 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. 阅读全文
posted @ 2015-09-09 10:56 真高兴 阅读(227) 评论(0) 推荐(0) 编辑
摘要: Getting Started with Blocks(开始block) The following sections help you to get started with blocks using practical examples. 阅读全文
posted @ 2015-09-09 10:05 真高兴 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 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. 阅读全文
posted @ 2015-09-09 09:50 真高兴 阅读(452) 评论(2) 推荐(1) 编辑
摘要: 今天是2015年9月9日,我整理了空置了4年的博客园账户,重新出发~ 阅读全文
posted @ 2015-09-09 09:44 真高兴 阅读(110) 评论(0) 推荐(0) 编辑