Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sketch of VoiceOver SwiftUI previews #213

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DavidBrunow
Copy link
Contributor

This pull request is a sketch of what VoiceOver SwiftUI previews could look like.

Here are some decisions I made in this implementation:

  • Created a modifier that could be added on top of an existing preview so multiple previews were not needed. This means that a button must be pressed, or a binding must be set to true, to see the VoiceOver preview
  • Used the existing AccessibilitySnapshotView, including the snapshot of the content, rather than rendering the bounding boxes on top of the existing view
  • Placed the legend below the view that has been snapshotted

Here is a screen recording of the preview in action:

Screen.Recording.2024-03-10.at.20.14.43.mov

@@ -0,0 +1,21 @@
Pod::Spec.new do |s|
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to create a new podspec to be able to import AccessibilitySnapshotCore into the code files with the previews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant