title: Setting style of UITableViewCell when using iOS 6 UITableView dequeueReusableCellWithIdentifier:forIndexPath:
body: <p>I'm trying to work out how to set the <code>UITableViewCellStyle</code> when using the new methods in iOS 6 for <code>UITableView</code>.</p>
  
  <p>Previously, when creating a <code>UITableViewCell</code> I would change the <code>UITableViewCellStyle</code> enum to create different types of default cells when calling <code>initWithStyle:</code> but from what I can gather, this is no longer the case.</p>
  
  <p>The Apple documentation for <code>UITableView</code> states:</p>
  
  <blockquote>
    <p><strong>Return Value</strong>:
    A UITableViewCell object with the associated reuse identifier. This method always returns a valid cell.</p>
    
    <p><strong>Discussion</strong>:
    For performance reasons, a table view's data source should generally reuse UITableViewCell objects when it assigns cells to rows in its tableView:cellForRowAtIndexPath: method. A table view maintains a queue or list of UITableViewCell objects that the data source has marked for reuse. Call this method from your data source object when asked to provide a new cell for the table view. This method dequeues an existing cell if one is available or creates a new one based on the class or nib file you previously registered.</p>
    
    <p><strong>Important</strong>: You must register a class or nib file using the registerNib:forCellReuseIdentifier: or registerClass:forCellReuseIdentifier: method before calling this method.</p>
    
    <p>If you registered a class for the specified identifier and a new cell must be created, this method initializes the cell by calling its initWithStyle:reuseIdentifier: method. For nib-based cells, this method loads the cell object from the provided nib file. If an existing cell was available for reuse, this method calls the cell’s prepareForReuse method instead.</p>
  </blockquote>
  
  <p>This is how my new <code>cellForRowAtIndexPath</code> looks after implementing the new methods:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *cellIdentifier = @"cell_identifier";
  
      [tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:cellIdentifier];
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
  
      return cell;
  }
  </code></pre>
  
  <p>The code I have so far works fine but always returns the default style. How can I change this so I can create cells with the other styles such as <code>UITableViewCellStyleDefault</code>, <code>UITableViewCellStyleValue1</code>, <code>UITableViewCellStyleValue2</code> and <code>UITableViewCellStyleSubtitle</code>?</p>
  
  <p>I don't want to subclass <code>UITableViewCell</code>, I just want to change the default type as I could do prior to iOS 6. It seems odd that Apple would provide enhanced methods but with minimal documentation to support their implementation.</p>
  
  <p>Has anyone mastered this, or run in to a similar problem? I'm struggling to find any reasonable information at all.</p>