Closed haarj closed 1 year 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
@haarj Hello, thank you, I've forwarded your feedback to the developers.
This is the best
var pos = superview.frame.size.height - view.frame.origin.y
@haarj Thanks for the feedback, we will consider this suggestion in the next release
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 theobserveValueForKeyPath
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