Created
December 24, 2014 08:58
-
-
Save robnadin/bce95f5a826b0cdffc89 to your computer and use it in GitHub Desktop.
Workaround for self-sizing table view cells on iOS 8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AutoSizingCell.swift | |
// | |
// | |
// Created by Rob Nadin on 24/12/2014. | |
// Copyright (c) 2014 Rob Nadin. All rights reserved. | |
// | |
import UIKit | |
class AutoSizingCell: UITableViewCell { | |
override func layoutSubviews() { | |
super.layoutSubviews() | |
// Fix for self-sizing cells | |
self.contentView.layoutIfNeeded() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment