jel/Jel/Extensions/BindingNot.swift

19 lines
283 B
Swift

//
// BindingNot.swift
// Jel
//
// Created by zerocool on 2/20/24.
//
import Foundation
import SwiftUI
extension Binding where Value == Bool {
var not: Binding<Value> {
Binding<Value>(
get: { !self.wrappedValue },
set: { self.wrappedValue = !$0 }
)
}
}