     
     // MARK: - UIViewController
     
-    // TODO: Implement with newer callback methods.
-    override func didRotateFromInterfaceOrientation(fromInterfaceOrientation: UIInterfaceOrientation) {
-        super.didRotateFromInterfaceOrientation(fromInterfaceOrientation)
-        // Adjust cell heights:
-        tableView.beginUpdates()
-        tableView.endUpdates()
+    override func viewDidLayoutSubviews() {
+        super.viewDidLayoutSubviews()
+        // TODO: Check that lastCell isn't called if filledUsingLastCell == false
+        if let lastCell = lastCell where filledUsingLastCell {
+            let adjustment = tableView.frame.height + tableView.contentInset.top - CGRectGetMaxY(lastCell.frame)
+            if adjustment > 0 {
+                lastCell.frame.size.height += adjustment
+                lastCell.setNeedsLayout()
+            }
+        }
     }
     
     // MARK: - UITableViewDataSource


class StaticTableViewController: UITableViewController {
    
    @IBInspectable var filledUsingLastCell: Bool = false
    @IBInspectable var automaticCellHeights: Bool = false
    
    /// Override in subclass, usually by connecting to an IBOutlet collection.
    var excludedCells: [UITableViewCell]? {
        return nil
    }
    
    // MARK: - Functions

        return cell
    }
    
}
