File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Sources/ResponsiveTextField Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -195,10 +195,15 @@ public struct FirstResponderStateChangeHandler {
195195 /// in a `withAnimation` closure - this is useful if your state change handler is performing
196196 /// some state change and you want that change to be animated.
197197 ///
198- public func animation( ) -> Self {
198+ /// - Parameters:
199+ /// - animation: The animation to perform, or `nil` if you want to explicitly disable animations.
200+ ///
201+ public func animation( animation: Animation ? = . default) -> Self {
199202 . init(
200203 handleStateChange: { isFirstResponder in
201- withAnimation { self . handleStateChange ( isFirstResponder) }
204+ withAnimation ( animation) {
205+ self . handleStateChange ( isFirstResponder)
206+ }
202207 } ,
203208 canBecomeFirstResponder: canBecomeFirstResponder,
204209 canResignFirstResponder: canResignFirstResponder
You can’t perform that action at this time.
0 commit comments