title: How to break block loop in Objective - C?
body: <p>I have these declarations in header file:<br>
  <strong>Note:</strong> <em>I won't explain the whole code, I think it is easy to understand</em></p>
  
  <pre><code>typedef void (^loopCell)(id cell);
  -(id)allCells:(loopCell)cell;
  </code></pre>
  
  <p>And <strong>allCells</strong> function implementation:</p>
  
  <pre><code>-(id)allCells:(loopCell)cell
  {
      for (AAFormSection *section in listSections)
      {
          for (id _cell in section.fields) {
              cell(_cell);
          }
      }
      return nil;
  }
  </code></pre>
  
  <p>The usage of <strong>allCells</strong> function:</p>
  
  <pre><code>-(void)setFieldValue:(NSString *)value withID:(int)rowID
  {    
      [self allCells:^(id cell) {
          if([cell isKindOfClass:[AAFormField class]]) {
              AAFormField *_cell = (AAFormField *)cell;
              if(_cell.rowID == rowID) {
                  _cell.value = value;
                  //return; Here I want to terminate loop
              }
          }
      }];
  }
  </code></pre>
  
  <p><strong>My problem is</strong>, I can't <strong>terminate</strong> allCells loop in the middle (actually when I found object I need in the loop, I don't want iterate through other objects)<br><br>
  How can I stop allCells loop in the middle?</p>