Last active
January 13, 2022 07:15
-
-
Save paigeshin/281a738f7208003a2f07ce5a19eaf37a 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
class AutoSizingUiTableView : UITableView | |
{ | |
override func intrinsicContentSize() -> CGSize | |
{ | |
let requiredHeight = rowCount * rowHeight | |
return CGSize(width: UIView.noIntrinsicMetric, height: CGFloat(requiredHeight)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment