title: How to set a button tag to an array of arrays entry point
body: <p>I need some help. I'm currently learning objective c and I'm trying to do the following:</p>
  
  <p>Add to story board a button(action) textfield &amp; label(checked)
  type in a number in the text field press the button=>create o a new row a new button with as many text field as requested previously.(checked)
  Store each new button+ it's text fields into an array, then store that array in a new array, rows and columns[0][0] etc style(checked)
  Add for each new button I create a tag and use array count method for it to identify my button(checked). I do this because each array looks like this [0]button[1]textfield[2]textfield and so on with only textfields following.</p>
  
  <p>Now here is my code to create my button:</p>
  
  <pre><code>UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
  button.frame = CGRectMake(_x, _y, 100.0, 30.0);
  [button setTitle:@"Calculate" forState:UIControlStateNormal];
  button.tag = [_arayOfArays count];
  [button addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside];
  [self.view addSubview:button];
  </code></pre>
  
  <p>And this is my method that calls it:</p>
  
  <pre><code>-(void)myAction:(UIControl*)sender{
  
  
  if ([[_arayOfArays objectAtIndex:sender]count] == 4) {
  
   //here i call another method that calculates the area of a triangle if the button I would press would be in a same array with another 3 text fields 
  }
  </code></pre>
  
  <p>Now my problem is that my sender address memory always points to [0][0] or [1][0] and so on depending on what i pressed, and I want it to point to [0] or [1] and so on so I can use the count method.</p>
  
  <p>Can anyone please give me a hint on how I achieve this? Thanks and sorry for the long post.</p>