From a73a82216e9c668dd7a4e1720155e05fdde12a02 Mon Sep 17 00:00:00 2001 From: Des Marks Date: Mon, 13 Jan 2025 12:42:34 -0800 Subject: [PATCH] Use view bounds instead of view frame when calculating offset (#2115) --- .../Components/Bottom Sheet/BottomSheetController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetController.swift b/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetController.swift index c0c42f80a..ec87fffe2 100644 --- a/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetController.swift +++ b/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetController.swift @@ -1038,16 +1038,16 @@ public class BottomSheetController: UIViewController, Shadowable, TokenizedContr switch expansionState { case .collapsed: if !isHeightRestricted || !isExpandable { - offset = view.frame.maxY - collapsedSheetHeight + offset = view.bounds.maxY - collapsedSheetHeight } else { // When we're height restricted a distinct collapsed offset doesn't make sense, // so we go straight to expanded. fallthrough } case .expanded: - offset = view.frame.maxY - expandedSheetHeight + offset = view.bounds.maxY - expandedSheetHeight case .hidden: - offset = view.frame.maxY + offset = view.bounds.maxY case .transitioning: offset = bottomSheetView.frame.minY }