title: How to Set UITableViewCellStyleSubtitle and dequeueReusableCell in Swift?
body: <p>I'd like a <code>UITableView</code> with <code>subtitle</code>-style cells that use <code>dequeueReusableCellWithIdentifier</code>.</p>
  <p>My original Objective-C code was:</p>
  <pre><code>static NSString *reuseIdentifier = @&quot;Cell&quot;;
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
  if(!cell)
  {
      cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier];
  }
  </code></pre>
  <p>After searching the few <code>UITableView</code> questions here already on SO, I thought to write it in Swift like so:</p>
  <pre><code>tableView.registerClass(UITableViewCell.classForCoder(), forCellReuseIdentifier: &quot;Cell&quot;)
  
  let cell = tableView.dequeueReusableCellWithIdentifier(&quot;Cell&quot;, forIndexPath: indexPath) as UITableViewCell
  </code></pre>
  <p>But that doesn't let me say I want a <code>subtitle</code> style.  So I tried this:</p>
  <pre><code>var cell :UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: &quot;Cell&quot;)
  </code></pre>
  <p>Which gives me a <code>subtitle</code> cell, but it doesn't let me <code>dequeueReusableCellWithIdentifier</code>.</p>
  <p>I've researched some more and looked at <a href="https://www.youtube.com/watch?v=Tq0nkr9nhyk" rel="nofollow noreferrer">this video tutorial</a>, but he creates a separate <code>subclass</code> of <code>UITableViewCell</code> which I assume is unnecessary as I accomplished this same effect previously in Obj-C.</p>
  <p>Any ideas? Thanks.</p>