Skip to content

Instantly share code, notes, and snippets.

@jamestapping
Created April 2, 2021 15:22
Show Gist options
  • Save jamestapping/af8e607a642d73b9fdf3d2b15881904e to your computer and use it in GitHub Desktop.
Save jamestapping/af8e607a642d73b9fdf3d2b15881904e to your computer and use it in GitHub Desktop.
import UIKit
class TableViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
// MARK: - Table view data source
override func numberOfSections(in tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return 5
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "textViewCell", for: indexPath) as! TextViewCell
cell.delegate = self
return cell
}
}
extension TableViewController: TextViewCellDelegate {
func updateCellHeight() {
tableView.beginUpdates()
tableView.endUpdates()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment