Repository navigation
Add native zoom transitions to the built-in image viewer - #186
linzhiyi (LimChihi) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
linzhiyi (@LimChihi) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
2 similar comments
|
linzhiyi (@LimChihi) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
linzhiyi (@LimChihi) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
🟡 Changes recommended
The test bypasses production transition-source wiring and does not protect repeated-image behavior.
1 open finding
What changed in this PR
Adds iOS 18 native zoom transitions to the built-in fullscreen image viewer while preserving earlier iOS behavior.
Changes:
- Adds per-image transition namespaces and native zoom presentation.
- Coordinates panning, pinching, and interactive dismissal.
- Adds accessibility identifiers and transition coverage.
| File | Description |
|---|---|
BlockImageView.swift |
Defines each inline image as a unique transition source. |
ImageViewerView.swift |
Applies the native destination transition and fullscreen layout. |
PinchZoomView.swift |
Coordinates custom gestures with native dismissal. |
ImageViewerTransitionTests.swift |
Tests presentation transition configuration. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Image(systemName: "photo") | ||
| .resizable() | ||
| .frame(width: 200, height: 120) | ||
| .matchedImageSource(namespace: namespace) |

Summary
The built-in fullscreen image viewer currently opens without a transition from the tapped image. Add native zoom presentation and dismissal on iOS 18 and later, entirely within the library.
Closes #185
Validation
make cipasses: lint, 120 XCTest cases (including the new fullscreen transition test), 9 Swift Testing cases, existing snapshot validation, and sample app build.OSS readiness