Browse Source

Force coercing dequeueReusableCellWithIdentifier to UITableViewCell

Mattt Thompson 11 years ago
parent
commit
2ff5749ffc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Example/DetailViewController.swift

+ 2 - 2
Example/DetailViewController.swift

@@ -100,7 +100,7 @@ class DetailViewController: UITableViewController {
 
         switch Sections(rawValue: indexPath.section)! {
         case .Headers:
-            let cell = self.tableView.dequeueReusableCellWithIdentifier("Header") as UITableViewCell
+            let cell = self.tableView.dequeueReusableCellWithIdentifier("Header") as! UITableViewCell
             let field = self.headers.keys.array.sorted(<)[indexPath.row]
             let value = self.headers[field]
 
@@ -109,7 +109,7 @@ class DetailViewController: UITableViewController {
 
             return cell
         case .Body:
-            let cell = self.tableView.dequeueReusableCellWithIdentifier("Body") as UITableViewCell
+            let cell = self.tableView.dequeueReusableCellWithIdentifier("Body") as! UITableViewCell
 
             cell.textLabel?.text = self.body