Source item disappears after swipe-back with .navigationTransition(.zoom)

[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()
    }
}

Thanks for the post.

I believe might be a known bug or at least has been reported and is currently under investigation. Would you be able to assist us by creating a concise and focused project that demonstrates the issue and illustrates how you utilize that API?

If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

Following the utilization of the provided sample, could you kindly submit a bug report and include the specific focused sample in question?

Once you open the bug report, please post the FB number here for my reference.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

Albert Pascual
  Worldwide Developer Relations.

@Bikrrr Thanks for providing me the bug. I see has been routed well.

For more details on when you'll see updates to your report, please see What to expect after submission.

Albert Pascual
  Worldwide Developer Relations.

Source item disappears after swipe-back with .navigationTransition(.zoom)
 
 
Q