You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When transitioning the position of a NavigationStack that has a clipShape applied to it, the view can end up rendering outside of the current safe area.
This is demonstrated in the code attached, this was written in a brand new project within Xcode, and should be a drop in replacement for the ContentView struct. The code has a top level VStack with a “top view” (with a blue border) and a NavigationStack beneath it (with a red border). When pressing the button you can see the top view come in and out of view, with and without animations depending on the button pressed.
When removing the top view from the screen with animations, the transition moves the navigation title bar to outside of the safe area bounds when we expect it to render within the safe area.
When using the non animated button, everything moves to the correct place.
Commenting out the .clipShape() will resolve the issue in the animated case.
Problem is present in previews, simulators, and on real devices (iPhone 15 Pro, iOS 17.6.1).
Description
When transitioning the position of a NavigationStack that has a clipShape applied to it, the view can end up rendering outside of the current safe area.
This is demonstrated in the code attached, this was written in a brand new project within Xcode, and should be a drop in replacement for the ContentView struct. The code has a top level VStack with a “top view” (with a blue border) and a NavigationStack beneath it (with a red border). When pressing the button you can see the top view come in and out of view, with and without animations depending on the button pressed.
Problem is present in previews, simulators, and on real devices (iPhone 15 Pro, iOS 17.6.1).
Xcode version: Version 15.4 (15F31d)
Files
ClipShareAnimationBug.swift
The text was updated successfully, but these errors were encountered: