         }
     }
     
+    
+    override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
+        resetCellHeightCache()
+        super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
+    }
+
+    
+    // MARK: - UITableViewDataSource
+    
     override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
         return pages.count
     }

import FranticApparatus

class LinksViewController: UITableViewController, UIActionSheetDelegate {
    let textOnlyLinkSizingCell = TextOnlyLinkCell(style: .Default, reuseIdentifier: nil)
    let thumbnailLinkSizingCell = ThumbnailLinkCell(style: .Default, reuseIdentifier: nil)
    var cellHeightCache = [NSIndexPath:CGFloat]()
    var pages = [Listing<Link>]()
    var votePromises = [Link:Promise<Bool>](minimumCapacity: 8)
    var showCommentsAction: ((Link) -> ())!
    var showLinkAction: ((Link) -> ())!
    var fetchNextPageAction: (() -> ())!
    var voteAction: ((Link, VoteDirection) -> ())!
    var fetchThumbnailAction: ((String, NSIndexPath) -> UIImage?)!
    
    func upvoteLink(link: Link, upvote: Bool) {
        if upvote {

            return cell
        }
    }
    
    
    // MARK: - UITableViewDelegate
    
    override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
        if let cachedHeight = cellHeightCache[indexPath] {
