This commit is contained in:
世界 committed 2023-10-02 22:12:33 +08:00
1 parent c1c4f084b9
commit c5a29e0956
16 files changed
+256 -247

No files matched your search

@@ -0,0 +1,12 @@
import Foundation
import SwiftUI
public extension Binding {
func withSetter(_ setter: @escaping (Value) -> Void) -> Binding<Value> {
Binding {
wrappedValue
} set: { [setter] newValue, _ in
setter(newValue)
}
}
}