This presentation covers iOS development using blocks, Apple’s new addition to the Objective-C language. Here’s a short description of the files included:
- block_typedefs.c: This file shows how to use typedefs to make writing blocks cleaner and much more concise.
- blocks_capture_scope.c: This file shwos how blocks capture values from their surrounding scope.
- blocks_dont_modify_scope.c: This file shows how blocks modify the values they capture—or rather, how they don’t! Don’t expect this one to compile.
- blocks_retain_objects.m: This file shows how blocks retain Objective-C objects in their surrounding scope. At first glance, this should fail with an
EXC_BAD_ACCESSerror, but it works!
- dispatch_example.c: This shows a basic use of dispatch queues.
- helloblock.c: This is the “Hello, world!” of writing blocks. Literally.