title: Switch statement for the tag property of a view
body: <p>I'm trying to set up a tableview that has 2 cells. Both cells have their own classes and they have their own methods to configure them. In code, when i get to the cellforrowatindexpath method, i get stuck. I can only dequeue one of the cells and call it's methods, which means the other cell won't  configured. I want to configure both. Here's what i'm (currently) trying in the cellforrow method: </p>
  
  <pre><code>    let cells = [tableView.viewWithTag(1), tableView.viewWithTag(2)]
  
  
  
      for view in cells {
  
          var reuseIdentifier = "cellID"
  
  
          switch view?.tag {
          case 1:                           // error occurs here
              reuseIdentifier = "storyCell"
              let storyCell1 = tableView.dequeueReusableCellWithIdentifier(reuseIdentifier, forIndexPath: indexPath) as! StoryCell1
  
              storyCell1.theCategory.text = newsItem.storyCategory
              storyCell1.theTitile.text = newsItem.titleText
              storyCell1.firstParagraph.text = newsItem.paragraph1
  
          case 2:                           // error occurs here too
              reuseIdentifier = "storyCell2"
              let storyCell2 = tableView.dequeueReusableCellWithIdentifier(reuseIdentifier, forIndexPath: indexPath) as! StoryCell2
              storyCell2.configureCell(newsItem)
  
  
          default:
  
          }
  </code></pre>
  
  <p>in the storyboard, i have given both those cells tags of 1 and 2 respectively, hence the array at the very beginning. I have 2 problems with this approach. </p>
  
  <ol>
  <li><p>I can't use it because the switch statement is throwing me an error: Expression pattern of type 'Int' cannot match values of type 'Int?'</p></li>
  <li><p>even if it were to not have the error above, i can still only return one cell at the end of the method.</p></li>
  </ol>
  
  <p>any help on my approach or a different, better way to handle this would be appreciated. Thanks! </p>
  
  <p><strong>EDIT:</strong> </p>
  
  <p>Since I'm sure i've added the tag property i force unwrapped the view!.tag property and the error goes away. So, the 2nd question now remains. </p>