I've seen so many articles on this I've lost my mind. I'm trying to do a really simple thing but it seems so hard.
I'm trying to achieve something like this
https://objectpartners.com/2019/07/09/building-an-ios-chat-feature-without-hacks/
Basically when you click the text input it shows keyboard and when you scroll the chat down (ScrollView) it hides the keyboard.
First of all I want this smooth interactive scroll to hide / show the text input with keyboard:
UIScrollView.appearance().keyboardDismissMode = .interactive
This is working good except one problem. It's actually leaving the text input in place and only scrolling the keyboard down. So I'm trying to change the toolbar to be input accessory. I have a photo image and a send button as well. Basically the same bar you see in WhatsApp and iMessage.
I need the bar to scroll down. Not just the keyboard.
// what do I put here?
override func canBecomeFirstResponder() -> Bool {
return true
}
