title: Store a swift closure as a property on an objective-c class where the block is declared using a typedef
body: <p>OMG, for the life of me I can't get this to work.</p>
  
  <ul>
  <li>I've got a <code>typdef</code> in objective-c that looks like this:</li>
  </ul>
  
  <pre class="lang-c prettyprint-override"><code>typedef void (^StringBlock)(NSString * string);
  </code></pre>
  
  <ul>
  <li>I've got an objective-c class that has a property that allows you to store your own block of <code>StringBlock</code> type. That property is declared in objective-c like this:</li>
  </ul>
  
  <pre class="lang-c prettyprint-override"><code>@property (nonatomic, copy) StringBlock onTextSubmitBlock;
  </code></pre>
  
  <ul>
  <li>Assigning a block to it in objective-c looks like this:</li>
  </ul>
  
  <pre class="lang-c prettyprint-override"><code>input.onTextSubmitBlock = ^(NSString * text) {
  
  };
  </code></pre>
  
  <ul>
  <li>I want to do the same thing from within a Swift class! The closest I've come to having something that works is this:</li>
  </ul>
  
  <pre class="lang-c prettyprint-override"><code>input!.onTextSubmitBlock = {(StringBlock) in
  
  }
  </code></pre>
  
  <p>That compiles, but I have no access to the argument I need (<code>(NSString * text)</code> in objective-c...)</p>
  
  <p>I'm sure that once I get used to Swift this will be obvious, but what am I missing?</p>