Created
June 27, 2019 14:47
-
-
Save mbrandonw/6d1083a2c75c2671c2fd4b6e8b17b4a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension View { | |
func presentation(_ alert: Alert?) -> some View { | |
guard let alert = alert else { return AnyView(self) } | |
let binding = Binding<Bool>.constant(true) | |
return AnyView(self.presentation(binding) { alert }) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment