I’m seeing the same behavior in my custom keyboard:
Switching from Apple’s English keyboard to the custom keyboard adds a 17-point gap above its content.
Switching from Apple’s Emoji keyboard to the custom keyboard removes the gap.
I compared Xcode view hierarchy captures from the host app in both states. The extension’s content remains 440 × 322 points, with unchanged safe-area insets. The host-owned inputView.top constraint changes from 0 to 17 points, and UIInputSetHostView grows from 397 to 414 points.
The host container moves upward by 17 points while the keyboard content stays at the same screen position. Bottom spacing remains 75 points. The keyboard background therefore appears taller without any change to the extension’s actual layout.
This suggests the extra spacing depends on the previously active system keyboard. Is there a supported way for a keyboard extension to reset this inset?
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: