title: TableView rounded corners and shadow
body: <p>I have a tableview with three rows. I am trying to make the table rows have rounded corners and also a shadow effect around the entire tableview. For some reason, I cannot make the tableview both have the rounded corners and shadow effect but I could do them separately if I comment out the code responsible for one of the features. Here is the code I am using:</p>
  
  <pre><code>//this is for shadow effect
  
  tableView.backgroundColor = UIColor.clearColor()
  
  tableView.layer.shadowColor = UIColor.darkGrayColor().CGColor   
  
  tableView.layer.shadowOffset = CGSize(width: 2.0, height: 2.0
  
  tableView.layer.shadowOpacity = 1.0
  
  tableView.layer.shadowRadius = 2
  
  // This is for rounded corners
  
  tableView.layer.cornerRadius = 10
  
  tableView.layer.masksToBounds = true
  </code></pre>