Skip to content

Commit f17debb

Browse files
authored
Fixed BottomSheet size updating (#164)
1 parent 5a5a2a0 commit f17debb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Sources/Addons/BottomSheet/BottomSheetStackController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import UIKit
33

44
open class BottomSheetStackController: UINavigationController {
55

6+
private var lastPreferredContentSize = CGSize.zero
67
private var isUpdatingStack = false
78

89
private func updatePreferredContentSizeIfNeeded() {
@@ -31,7 +32,9 @@ open class BottomSheetStackController: UINavigationController {
3132
height: preferredContentHeight
3233
)
3334

34-
if self.preferredContentSize != preferredContentSize {
35+
if lastPreferredContentSize != preferredContentSize {
36+
lastPreferredContentSize = preferredContentSize
37+
3538
self.preferredContentSize = preferredContentSize
3639
}
3740
}

0 commit comments

Comments
 (0)