title: How to write and pass a completion block parameter for a method?
body: <p>I have a method that basically uses this:</p>
  
  <pre><code>-(void)myMethodwithDuration:(NSTimeInterval)time{
  [UIView animateWithDuration:time
                       animations:^{
                            // do thing here
                       }
                       completion:^(BOOL finished){
                            //do completion stuff here
                       }
       ];
  </code></pre>
  
  <p>What I don't know how to do is to write/package up a parameter so that I can write the code I want to execute, and then simply pass it into the method like I do with <code>time</code>.</p>
  
  <p>Any help appreciated. Thanks</p>