Created
April 12, 2021 09:46
-
-
Save thecoolwinter/bca206abb61a95de3acd6105177a3b24 to your computer and use it in GitHub Desktop.
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
import UIKit | |
final class ContentSizedTableView: UITableView { | |
override var contentSize:CGSize { | |
didSet { | |
invalidateIntrinsicContentSize() | |
} | |
} | |
override var intrinsicContentSize: CGSize { | |
layoutIfNeeded() | |
return CGSize(width: UIView.noIntrinsicMetric, height: contentSize.height) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment