Skip to content

Commit

Permalink
Prevent recursion in heightForRow method.
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVann committed Nov 5, 2017
1 parent a276e4b commit 1021296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ViewController: UITableViewController {

override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
// Get the correct height if the cell is a DatePickerCell.
let cell = self.tableView.cellForRow(at: indexPath)
let cell = cells[indexPath.section][indexPath.row]
if (cell is DatePickerCell) {
return (cell as! DatePickerCell).datePickerHeight()
}
Expand Down

0 comments on commit 1021296

Please sign in to comment.