fix preferredContentSize

This commit is contained in:
Jed Fox 2022-11-26 16:37:48 -05:00
parent 7ab6ea0d23
commit dbf95f726c
No known key found for this signature in database
GPG Key ID: 0B61D18EA54B47E1
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class AltViewController: UIViewController {
super.viewDidLayoutSubviews() super.viewDidLayoutSubviews()
UIView.performWithoutAnimation { UIView.performWithoutAnimation {
preferredContentSize = CGSize( preferredContentSize = CGSize(
width: label.intrinsicContentSize.width + view.layoutMargins.left + view.layoutMargins.right, width: label.intrinsicContentSize.width + 16,
height: label.intrinsicContentSize.height + view.layoutMargins.top + view.layoutMargins.bottom height: label.intrinsicContentSize.height + view.layoutMargins.top + view.layoutMargins.bottom
) )
} }