Edge to edge custom keyboard on iPhone X in landscape orientation

I am using objective-c to develop a custom keyboard on iPhone X to run in landscape orientation. I want my to make use of the full iPhone X screen and have my custom keyboard layout extending from left edge to right edge of the screen in landscape orientation.


No matter what I try, my custom keyboard layout stays confined in the safe area.


What do you recommend?


Thank you

This problem is caused by UIScreenEdgePanGestureRecognizer intercepting touches near screen edges. I found a complete solution:

The fix has three parts that must all be implemented together. Partial implementations will not fully resolve the issue.

here's the solution: https://gist.github.com/hamdiqbal/f642e2d73d58e76f65a76dc10b44e725

Key insight: you must call setNeedsUpdateOfScreenEdgesDeferringSystemGestures() in BOTH viewDidLoad and viewWillAppear. Most solutions only call it once which is why they fail after view transitions.

Also critical: walk the full view hierarchy up to window level — system gesture recognizers are attached to parent views outside your keyboard's own view. Tested and working on iPhone X, 12, 13, 14 and 15 series on iOS 16, 17 and 18.

Edge to edge custom keyboard on iPhone X in landscape orientation
 
 
Q