Skip to content

Commit 9ff78ab

Browse files
lukas-capLukas Capkovicclaude
authored
[Bottom Sheet] Reset wantsHighFrameRateIdle on pan gesture end (#2250)
When an in-flight spring animation is interrupted via completeAnimationsIfNeeded(), the completion block that resets wantsHighFrameRateIdle is never called. Reset the flag in .ended/.cancelled/.failed to ensure it doesn't remain enabled past the gesture lifecycle. Co-authored-by: Lukas Capkovic <lucapkov@microsoft.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b777126 commit 9ff78ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/FluentUI_iOS/Components/BottomSheet/BottomSheetController.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,9 @@ public class BottomSheetController: UIViewController, Shadowable, TokenizedContr
986986
sender.setTranslation(.zero, in: view)
987987
case .ended, .cancelled, .failed:
988988
completePan(with: sender.velocity(in: view).y)
989+
if #available(iOS 18.0, visionOS 2.0, *), usesCustomSpringAnimator && usesHighFrameRatePanning {
990+
sheetAnimator.wantsHighFrameRateIdle = false
991+
}
989992
default:
990993
break
991994
}

0 commit comments

Comments
 (0)