title: cant return cell in cellForRowAtIndexPath
body: <p>i'm trying to return different cells in a tableView. Normally in this case i would return different cells and then return nil at the bottom, but in this case it gives me and error. I've tried returning an empty cell as well, but also gives me and error.</p>
  <p>What i've tried</p>
  <pre><code>return nil
  </code></pre>
  <p>and</p>
  <pre><code> var cell: UITableViewCell!
    return cell
  </code></pre>
  <p>but both returned errors. How can i fix this?</p>
  <h1>cellForRowAtIndex</h1>
  <pre><code>override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      
      
      
      if indexPath.row == 0 {
  
  
          let cell: UITableViewCell = tableView.dequeueReusableCellWithIdentifier(&quot;imageCell&quot;, forIndexPath: indexPath) as UITableViewCell
          var imageFile = cell.viewWithTag(100) as PFImageView
          imageFile.image = itemFile
  
  
          cell.selectionStyle = UITableViewCellSelectionStyle.None
          return cell
          
      } else if indexPath.row == 1 {
          let cell: UITableViewCell = tableView.dequeueReusableCellWithIdentifier(&quot;segmentCell&quot;, forIndexPath: indexPath) as UITableViewCell
          
          var titleLabel = cell.viewWithTag(101) as UILabel?
          titleLabel?.text = itemTitle
          
          let segmentControl = cell.viewWithTag(102) as UISegmentedControl
          segmentControl.selectedSegmentIndex = segment
          segmentControl.setTitle(&quot;Beskrivelse&quot;, forSegmentAtIndex: 0)
          segmentControl.setTitle(&quot;Sælger&quot;, forSegmentAtIndex: 1)
          segmentControl.setTitle(&quot;Lokation&quot;, forSegmentAtIndex: 2)
          segmentControl.tintColor = UIColor(rgba: &quot;#619e00&quot;)
          var font = UIFont(name: &quot;Lato-Regular&quot;, size: 11)
          var attributes:NSDictionary = NSDictionary(object: font , forKey: NSFontAttributeName)
          segmentControl.setTitleTextAttributes(attributes, forState: UIControlState.Normal)
          segmentControl.addTarget(self, action: &quot;segmentAction:&quot;, forControlEvents: .ValueChanged)
          
  
          cell.selectionStyle = UITableViewCellSelectionStyle.None
          
          return cell
        
      } else if indexPath.row == 2 {
          switch segment {
          case 0:
              let cell = tableView.dequeueReusableCellWithIdentifier(&quot;CellZero&quot;, forIndexPath: indexPath) as DescViewCell
              return cell
          case 1:
              let cell = tableView.dequeueReusableCellWithIdentifier(&quot;CellOne&quot;, forIndexPath: indexPath) as SellerViewCell
              return cell
          case 2:
              let cell = tableView.dequeueReusableCellWithIdentifier(&quot;CellTwo&quot;, forIndexPath: indexPath) as LocationViewCell
              return cell
          default:
              break
          
          }
      }
          
      
      var cell: UITableViewCell!
      return cell
  }
  </code></pre>