Skip to content

Instantly share code, notes, and snippets.

@omgbbqhaxx
Last active July 15, 2019 08:38
Show Gist options
  • Select an option

  • Save omgbbqhaxx/ffac9d3630defa9c9c2113e6e142e59d to your computer and use it in GitHub Desktop.

Select an option

Save omgbbqhaxx/ffac9d3630defa9c9c2113e6e142e59d to your computer and use it in GitHub Desktop.
TableViewBasics.
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath as IndexPath)
cell.textLabel?.text = "Hi, im jason walker. I can make them everything."
cell.selectionStyle = UITableViewCell.SelectionStyle.none
cell.backgroundColor = UIColor.white
//cell.backgroundColor = UIColor(red:0.87, green:0.91, blue:0.94, alpha:1.0)
return cell
}
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
return 70
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment