lukeredpath / swift-responsive-textfield

A SwiftUI wrapper around UITextField with binding-based state and responder control
Apache License 2.0
86 stars 13 forks source link

Replace FirstResponderStateChangeHandler typealias with real type #2

Closed lukeredpath closed 3 years ago

lukeredpath commented 3 years ago

Replacing this with a real type provides the opportunity to create some default handlers for common tasks, such as a handler that automatically updates a binding to some state.

It could also have an animation modifier that returns a new handler that wraps the original in a withAnimation closure.