Last active
July 15, 2019 08:38
-
-
Save omgbbqhaxx/ffac9d3630defa9c9c2113e6e142e59d to your computer and use it in GitHub Desktop.
TableViewBasics.
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
| 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