[ad_1]
I wish to implement sure Views to include a @Binding property thus I created a protocol for this.
Like the next:
protocol DismissableView: View {
var isPresented: Binding<Bool> { get set }
}
And once I need my View to evolve to it, Like this:
struct MyView: DismissableView {
@Binding var isPresented: Bool
}
I get the next:
Sort 'MyView' doesn't conform to protocol 'DismissableView'
which I reckon is acquired to do with the truth that @Binding just isn’t the identical as Binding<Bool>
As you all are clearly conscious of the truth that I can not decalare a propertyWrapper in a protocol thus I’m unable to easily declare within the protocol a @Binding instantly, I’m fairly caught right here.
What am I to do.
T.I.A
[ad_2]
