When the keyboard is showing on the iPhone\'s Messages app, if the user begins a swipe down from the messages tableview and continues into the keyboard area, the keyboard will b
In swift you can use below code to get the view container of current keyboard (if exist), than you can change is's frame in your code:
UIApplication.shared.windows
.filter{ NSStringFromClass($0.classForCoder) == "UIRemoteKeyboardWindow" }
.first?.subviews.filter { NSStringFromClass($0.classForCoder) == "UIInputSetContainerView" }
.first?.subviews.filter { NSStringFromClass($0.classForCoder) == "UIInputSetHostView" }
.first
By the way here are a tool called Reveal make you can see the view hierarchical.