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

Remove sheet(unwrapping:), etc., helpers for sheet(item:) overloads #157

Merged
merged 3 commits into from
May 28, 2024

Conversation

stephencelis
Copy link
Member

Some cleanup we discussed that is a long time coming. This PR:

  • Deprecates all helpers that take unwrapping: parameters (except Binding.init(unwrapping:)).
  • Defines item: overloads instead.
  • Requires sheet, popover and fullScreenCover to take identifiable values or a key path to identity.

@stephencelis stephencelis requested a review from mbrandonw May 27, 2024 22:13
extension View {
@available(
*, deprecated,
message: "Use the 'navigationDestination(item:)' overload that passes a binding"
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not a 1-1 change, so maybe we should better message it. With this deprecation we are abandoning our attempt to work around SwiftUI bugs and instead just embrace the state of Apple's own framework code.

@stephencelis
Copy link
Member Author

Fixes #75.

@stephencelis stephencelis merged commit 7f16357 into main May 28, 2024
4 checks passed
@stephencelis stephencelis deleted the less-unwrapping branch May 28, 2024 16:33
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.

2 participants