title: Passing a variable as a parameter to a block
body: <p>I am running a code block in objective c and passing a variable as a parameter to it, the value of the variable changes inside the block. Is there a way to achieve this?</p>
  
  <pre><code>__block int timestamp=0; 
  [MyAPI queryName:timestamp withBlock:^(Data *data) {
    NSLog(@"%@", data);
    timestamp = data.timestamp;
  }];
  </code></pre>
  
  <p>I am not able to achieve this using the above code. Not sure what's the right way to get this done, or if it's doable in some other way. Thanks.</p>