 			}
 		}
 	}
-    
+	
+	func refreshDynamicLastCellHeight() {
+		dynamicLastCellHeight = nil
+		DispatchQueue.main.async {
+			self.updateFillUsingLastCell()
+			self.refreshCellHeights()
+		}
+	}
+	
     // MARK: - UIViewController
     
     override func viewDidLoad() {

			if isDynamicLastCell {
				if let dynamicLastCellHeight = self.dynamicLastCellHeight {
					height = dynamicLastCellHeight
				}
			} else {
				let previousRowFrame = tableView.rectForRow(at: IndexPath(row: indexPath.row - 1, section: indexPath.section))
				// Get height of empty spaces to fill
				let availableHeight = tableView.frame.size.height - previousRowFrame.maxY
				if availableHeight > lastCellIntrinsicHeight {

		// Use default height when last cell is not on the screen.
		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 let lastCell = tableView.cellForRow(at: lastCellIndexPath) {
