QuickBlox / quickblox-ios-sdk

QuickBlox iOS SDK for messaging and video calling
https://quickblox.com/developers/IOS
MIT License
397 stars 358 forks source link

ChatViewController - blank space between inputToolBar and Keyboard/keyboard predictive suggestions #1318

Closed haarj closed 1 year ago

haarj commented 2 years ago

I think this is the solution but not 100% var pos = view.frame.size.height - convertedViewPoint.y - self.view.frame.origin.y + 5

https://github.com/QuickBlox/quickblox-ios-sdk/blob/e3fb2f95a3d05e7eeaa36489da37d5869fd7c0d4/sample-chat-swift/sample-chat-swift/Components/ChatScreen/ChatViewController.swift#L178

Also I think you need to add observerAdded = false in these braces somewhere so if a user dismisses the keyboard by an interactive dismiss, the textview's keyboard can be hit again in the observeValueForKeyPath method and the calculation to show the toolbar on top of the keyboard runs - https://github.com/QuickBlox/quickblox-ios-sdk/blob/329b633192cd70e79b7488a967094d338149a7d4/sample-chat-swift/sample-chat-swift/Components/ChatScreen/Chat/KVOView.swift#L36

haarj commented 2 years ago

Even better - This sticks the input toolbar to the top of the keyboard as a user presents and dismisses the keyboard. var pos = superview.frame.size.height - view.frame.origin.y - self.view.frame.origin.y + 5 https://github.com/QuickBlox/quickblox-ios-sdk/blob/e3fb2f95a3d05e7eeaa36489da37d5869fd7c0d4/sample-chat-swift/sample-chat-swift/Components/ChatScreen/ChatViewController.swift#L178

ghost commented 2 years ago

@haarj Hello, thank you, I've forwarded your feedback to the developers.

haarj commented 2 years ago

This is the best var pos = superview.frame.size.height - view.frame.origin.y

ghost commented 2 years ago

@haarj Thanks for the feedback, we will consider this suggestion in the next release