[Submitted as FB21078443]
When using .matchedTransitionSource with .navigationTransition(.zoom), swiping back from the left edge to return from a detail view causes the source item to disappear once the transition finishes. It’s only a visual issue—the item is still there and can be tapped to open again.
This doesn’t happen when using the Back button; only the swipe-back gesture triggers it. Also, it only reproduces on a physical device, not in Simulator.
SYSTEM INFO
- Xcode 26.1.1 (17B100)
- macOS 26.1 (25B78)
- iOS 26.1 (23B85)
- iOS 26.2 (23C5044b)
REPRO STEPS
Run the code below on a physical device, tap an image, then swipe from the left edge to dismiss the detail view.
ACTUAL
The image zooms back to its origin, then disappears once the animation settles.
EXPECTED
The image card remains visible.
SCREENSHOTS
CODE
import SwiftUI
struct Item: Identifiable, Hashable {
let id = UUID()
let imageName: String
let title: String
}
struct ContentView: View {
@Namespace private var namespace
let items = [
Item(imageName: "SampleImage", title: "Sample Card 1"),
Item(imageName: "SampleImage2", title: "Sample Card 2")
]
var body: some View {
NavigationStack {
ScrollView {
VStack(spacing: 16) {
ForEach(items) { item in
NavigationLink(value: item) {
CardView(item: item)
.matchedTransitionSource(id: item.id, in: namespace)
}
.buttonStyle(.plain)
}
}
.padding()
}
.navigationTitle("Zoom Transition Issue")
.navigationSubtitle("Tap image, then swipe back from left edge")
.navigationDestination(for: Item.self) { item in
DetailView(item: item, namespace: namespace)
.navigationTransition(.zoom(sourceID: item.id, in: namespace))
}
}
}
}
struct CardView: View {
let item: Item
var body: some View {
GeometryReader { geometry in
ZStack(alignment: .bottom) {
Image(item.imageName)
.resizable()
.scaledToFill()
.frame(width: geometry.size.width, height: geometry.size.height)
.clipped()
}
}
.frame(height: 200)
.clipShape(RoundedRectangle(cornerRadius: 16))
}
}
struct DetailView: View {
let item: Item
let namespace: Namespace.ID
var body: some View {
Image(item.imageName)
.resizable()
.scaledToFill()
.clipped()
}
}