Skip to content

Instantly share code, notes, and snippets.

@YordiLorenzo
Created November 23, 2014 10:28
Show Gist options
  • Select an option

  • Save YordiLorenzo/6ee9cf2955578f0ad0b1 to your computer and use it in GitHub Desktop.

Select an option

Save YordiLorenzo/6ee9cf2955578f0ad0b1 to your computer and use it in GitHub Desktop.
Portfolio - Foodpin sample
// Custom tableview and tableviewcells with automatic dimensions
self.tableView.backgroundColor = UIColor(red: 240.0/255.0, green: 240.0/255.0, blue:
240.0/255.0, alpha: 0.2)
self.tableView.tableFooterView = UIView(frame: CGRectZero)
self.tableView.separatorColor = UIColor(red:
240.0/255.0, green: 240.0/255.0, blue: 240.0/255.0,
alpha: 0.8)
self.tableView.estimatedRowHeight = 36.0
self.tableView.rowHeight = UITableViewAutomaticDimension
// Restaurant model
class Restaurant: NSObject {
var name : String = ""
var type : String = ""
var location : String = ""
var image : String = ""
var isVisited : Bool = false
init(name : String, type : String, location : String, image : String, isVisited : Bool) {
self.name = name
self.type = type
self.location = location
self.image = image
self.isVisited = isVisited
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment