     lazy var lastCellIntrinsicHeight: CGFloat = {
         var height = self.tableView.estimatedRowHeight
         if let cell = self.tableView.cellForRow(at: self.lastCellIndexPath) {
-            // Already on screen or static table view controller
+            // Already on screen or static table view controller.
             cell.layoutIfNeeded()
             height = cell.frame.height
         } else {
-            // Hasn't loaded yet in cellForRowAt, calculate height after tableView is fully loaded
+            // Hasn't loaded yet in cellForRowAt, calculate height after tableView is fully loaded.
             self.isDynamicLastCell = true
         }
         return height

        guard tableView.indexPathsForVisibleRows?.contains(lastCellIndexPath) ?? false
            else { return }
        previousRowFrame = tableView.rectForRow(at: IndexPath(row: lastCellIndexPath.row - 1, section: lastCellIndexPath.section))
        // Get height of empty spaces to fill
        let availableHeight = tableView.frame.size.height - previousRowFrame.maxY
        if availableHeight.rounded() >= lastCellIntrinsicHeight {
            dynamicLastCellHeight = availableHeight
        }
        needRefreshDynamicLastCellHeight = false
    }
    
    fileprivate func refreshDynamicLastCellHeight() {

    }
    
    // MARK: - UITableViewDelegate
    
    override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
        if filledUsingLastCell && needRefreshDynamicLastCellHeight {
            if let indexPathsForVisibleRows = tableView.indexPathsForVisibleRows,
                let lastIndexPath = indexPathsForVisibleRows.last,
                lastIndexPath.row == indexPath.row
            {
                // Calculate height of last cell.
                DispatchQueue.main.async {
                    self.updateFillUsingLastCell()
                    self.refreshCellHeights()
