Closed jtansley closed 2 years ago
Hi @jtansley.
As the error mentions, the type of the identifier has to be optional. In your case, it infers non-optional type.
To make it optional, define it this way:
@State private var selectedDetentIdentifier: UISheetPresentationController.Detent.Identifier? = .medium
That worked, thank you and thanks again for the quick response!
Hello,
Thank you for this useful Swift package! I'm trying to integrate this into my project but I'm getting the following error:
Cannot convert value of type 'Binding<UISheetPresentationController.Detent.Identifier>' to expected argument type 'Binding<UISheetPresentationController.Detent.Identifier?>'
I have this variable set as follows:
@State private var selectedDetentIdentifier = UISheetPresentationController.Detent.Identifier.medium
Thanks for your time