2020-09-25a few seconds read (About 49 words)How to use Binding in function in SwiftIssue #675 Use wrappedValue to get the underlying value that Binding contains 123456789101112131415161718192021extension View { func addOverlay(shows: Binding<Bool>) -> some View { HStack { self Spacer() } .overlay( HStack { Spacer() SmallButton( imageName: "downArrow", tooltip: shows.wrappedValue ? "Collapse" : "Expand", action: { shows.wrappedValue.toggle() } ) .rotationEffect(.radians(shows.wrappedValue ? .pi : 0)) } ) }}#swiftswiftUI