title: How to store blocks in properties in Objective-C?
body: <p>I'd like to store objective-c block in a property for later use. I wasn't sure how to do it so I googled a bit and there is very little info about the subject. But I've managed to find the solution eventually and I've thought that it might be worth sharing for other newbies like me. </p>
  
  <p>Initially I've thought that I would need to write the properties by hand to use Block_copy &amp; Block_release. </p>
  
  <p>Fortunately I've found out that <a href="http://developer.apple.com/library/mac/#documentation/cocoa/Conceptual/Blocks/Articles/bxUsing.html#//apple_ref/doc/uid/TP40007502-CH5-SW1" rel="noreferrer">blocks are NSObjects</a> and <code>- copy</code>/<code>- release</code> is equivalent to <code>Block_copy</code>/<code>Block_release</code>. So I can use <code>@property (copy)</code> to auto generate setters &amp; getters.</p>