mirror of
https://github.com/cranci1/Sora.git
synced 2026-01-11 20:10:24 +00:00
tab bar fix (#241)
* Update JSController-NetworkFetch.swift * Shitty AI code by paul * Fix tab bar --------- Co-authored-by: cranci1 <100066266+cranci1@users.noreply.github.com>
This commit is contained in:
parent
3ba52e7df1
commit
cac8eba349
1 changed files with 6 additions and 3 deletions
|
|
@ -64,6 +64,10 @@ struct TabBar: View {
|
|||
return white > 0.5 ? 0.5 : 0.3
|
||||
}
|
||||
|
||||
private var shouldSlideUp: Bool {
|
||||
return keyboardFocus && keyboardHeight > 100
|
||||
}
|
||||
|
||||
@Namespace private var animation
|
||||
|
||||
private let tabWidth: CGFloat = 70
|
||||
|
|
@ -280,9 +284,8 @@ struct TabBar: View {
|
|||
.padding(.bottom, -100)
|
||||
.padding(.top, -10)
|
||||
}
|
||||
.offset(y: keyboardFocus ? -keyboardHeight + 40 : 0)
|
||||
.animation(.spring(response: 0.3, dampingFraction: 0.8), value: keyboardHeight)
|
||||
.animation(.spring(response: 0.3, dampingFraction: 0.8), value: keyboardFocus)
|
||||
.offset(y: shouldSlideUp ? -keyboardHeight + 40 : 0)
|
||||
.animation(.spring(response: 0.3, dampingFraction: 0.8), value: shouldSlideUp)
|
||||
.onChange(of: keyboardHeight) { newValue in
|
||||
withAnimation(.spring(response: 0.3, dampingFraction: 0.8)) {
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue