Created
November 7, 2014 04:43
-
-
Save thomasdegry/81d96cc190b9a592d73a to your computer and use it in GitHub Desktop.
Swift tableview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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