For example, let’s say we wanted to track how many times each view controller is presented to a user in an iOS app:Fortunately, there is another way: method swizzling from a category. Here’s how to do it:In computer science, pointer swizzling is the conversion of ...【阅读全文】
http://blog.devtang.com/2013/07/28/a-look-inside-blocks/这里 有关于 block 的 5 道测试题,建议你阅读本文之前先做一下测试。先介绍一下什么是闭包。在 wikipedia 上,闭包的定义) 是:In programming languages, a closure is a function or reference to a function together with a referencing e...【阅读全文】