Skip to content

Instantly share code, notes, and snippets.

@thomasdegry
Created November 7, 2014 04:43
Show Gist options
  • Save thomasdegry/81d96cc190b9a592d73a to your computer and use it in GitHub Desktop.
Save thomasdegry/81d96cc190b9a592d73a to your computer and use it in GitHub Desktop.
Swift tableview
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell = tableView.dequeueReusableCellWithIdentifier("CELL") as? UITableViewCell
if (cell == nil) {
cell = UITableViewCell(style: UITableViewCellStyle.Value1, reuseIdentifier: "CELL")
}
let cellSupermarket = superMarkets[indexPath.row]
cell?.textLabel.text = cellSupermarket.name
return cell!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment