From 2b31d9ec1d06e64353494b174612780e087edc51 Mon Sep 17 00:00:00 2001 From: KamiKuo Date: Mon, 11 Dec 2023 10:52:16 +0800 Subject: [PATCH] dont add keyboardHeight for intrinsic size contentViewController.preferredHeight include keyboard height already. --- FittedSheets/SheetViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FittedSheets/SheetViewController.swift b/FittedSheets/SheetViewController.swift index e6416c5..374e996 100644 --- a/FittedSheets/SheetViewController.swift +++ b/FittedSheets/SheetViewController.swift @@ -544,7 +544,7 @@ public class SheetViewController: UIViewController { case .fullscreen: contentHeight = fullscreenHeight case .intrinsic: - contentHeight = self.contentViewController.preferredHeight + self.keyboardHeight + contentHeight = self.contentViewController.preferredHeight case .percent(let percent): if (percent > 1) { debugPrint("Size percent should be less than or equal to 1.0, but was set to \(percent))")