title: iOS UITableView with dynamic prototypes and custom cell
body: <p>I have uitableviewcontroller with tableview with dynamic prototypes cell and even I change my cell style to subtitle or something else or I add accessory my cell always shows as basic style cell.</p>
  
  <p>Here is my cellForRowAtIndexPath function:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      NSInteger row = indexPath.row;
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  
      if (_dataArray &amp;&amp; row &lt; self.dataArray.count) {
          cell.textLabel.text = self.dataArray[row];
      }
  
      return cell;
  }
  </code></pre>
  
  <p>EDIT: There is something I don't understand, maybe someone can explain this. Earlier my app crashed when I show my table view controller, so I had to add this to the viewDidLoad method:</p>
  
  <pre><code>[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CellIdentifier];
  </code></pre>
  
  <p>After that the app did not crash, but it caused that I could not change the cell style. Now I can delete that, my app don't crash and I can change the cell style. Why?</p>
  
  <p>What am I doing wrong?</p>