ARTICLE AD BOX
I have a chat app with a ScrollView for messages and an input bar placed in .safeAreaInset(edge: .bottom). I'm using .scrollDismissesKeyboard(.interactively) which works great for dismissing the keyboard when scrolling the message content area.
However, the interactive dismiss only triggers when dragging within the ScrollView bounds. It only registers when my finger hits the top of the keyboard, not the input. The input bar sits between the messages and the keyboard (in the safe area inset), and dragging down from the input bar area does NOT trigger the interactive keyboard dismissal.
In iMessage, dragging down from the input bar area smoothly dismisses both the input bar and keyboard together because the input bar is a UITextView.inputAccessoryView.
How can I achieve this same behavior in SwiftUI? Is there a way to make the input bar participate in the interactive keyboard dismiss, or do I need to use inputAccessoryView via UIKit?
9743 gold badges18 silver badges39 bronze badges
1
Explore related questions
See similar questions with these tags.
