Created
April 2, 2021 15:22
-
-
Save jamestapping/af8e607a642d73b9fdf3d2b15881904e to your computer and use it in GitHub Desktop.
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
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