Skip to content

Commit

Permalink
Force coercing dequeueReusableCellWithIdentifier to UITableViewCell
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Mar 13, 2015
1 parent 950eda9 commit 2ff5749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Example/DetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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

Expand Down

0 comments on commit 2ff5749

Please sign in to comment.