Skip to content

Only box up content for .view introspection #305

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

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Only box up content for .view introspection #305

merged 2 commits into from
Jul 12, 2023

Conversation

davdroman
Copy link
Collaborator

Fixes #304.

Whilst this isn't the most elegant fix, it works. I guess my only reservation with it is that it introduces an ad-hoc piece of logic that can't be replicated outside the core library, but we can probably live with this very narrow edge case.

@@ -70,10 +70,14 @@ struct IntrospectModifier<SwiftUIViewType: IntrospectableViewType, PlatformSpeci
if let selector {
content
.background(
// boxes up content without affecting appearance or behavior, for more accurate `.view` introspection
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

without affecting appearance or behavior

image

@davdroman davdroman merged commit b400ef5 into master Jul 12, 2023
@davdroman davdroman deleted the fix-304 branch July 12, 2023 08:12
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.

Introspecting ScrollView and iOS 17
1 participant