This commit is contained in:
世界
2023-10-02 22:12:33 +08:00
parent c1c4f084b9
commit c5a29e0956
16 changed files with 256 additions and 247 deletions
@@ -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)
}
}
}