title: Trouble Passing Parameter from UiAlertAction
body: <p>I have a custom NSObject called <em>MapLayer</em>, and an NSMuttableArray of MapLayers, creatively titled <em>layersMutableArray</em>.  On a button press, I put up a <em>UIAlertController</em>.  I populate this alert with a list of my MapLayers, as so:</p>
  
  <pre><code>    __block NSInteger *n;
      n = 0;
      for (MapLayer *m in layersMutableArray) {
          UIAlertAction *newAction = [UIAlertAction actionWithTitle:m.sLayerName style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
              MapLayer *ml = layersMutableArray[(int)n];
              curLayer = ml;
              [self loadSpecificLayer];
              n++;
          }];
          [layerSelectionAlertView addAction:newAction];
      }
  </code></pre>
  
  <p>Now, all this works fine.  My AlertView shows up with all the right stuff in it. </p>
  
  <p>Here's the issue: when I click a "layer" (a UIAlertAction), and I call my loadSpecficLayer method, it always just reloads my first layer.  I think I am doing something incorrectly with the memory allocation and my int (creatively titled n), such that it's always being remembered as 0 and not incrementing, but I'm not sure.  I've tried various types of numbers (NSInteger, int), casting, and other tricks.  Any help much appreciated!</p>