There was an error while loading. Please reload this page.
1 parent 00fca04 commit b3c4f55Copy full SHA for b3c4f55
Sources/SwiftUIKit/extensions/adaptToKeyboard.swift
@@ -11,7 +11,12 @@ import Combine
11
12
public extension View {
13
func adaptToKeyboard() -> some View {
14
- modifier(AdaptToSoftwareKeyboard())
+ if #available(iOS 14.0, *) {
15
+ // iOS 14 (beta 6 +) does it automatically
16
+ return AnyView(self.animation(.spring()))
17
+ } else {
18
+ return AnyView(modifier(AdaptToSoftwareKeyboard()))
19
+ }
20
}
21
22
0 commit comments