title: Populating a Table View - How to Return No Cell Under Certain Conditions
body: <p>I am populating a UITableView using its delegate methods. Under certain conditions I'd like to return no cell. However the following delegate function requires me to define a UITableViewCell as a return type. Returning nil does not work (see switch case in the code example).</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView
           cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UITableViewCell"];
      cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"UITableViewCell"];
  
      switch (indexPath.section){
          case 0:
                  switch (indexPath.row){
                      case 0:
                          if ([eventItemObject eventDescription]){
                              return cell;
                          } else {
                              return nil;
                          }
                          break;
                          ...
                      default:
                      break;
                  }
              break;
              ...
          default:
          break;
      }
  
      return cell;
  }
  </code></pre>
  
  <p>How to return no cell under certain conditions?</p>