🟥🟦🟩 41
UIFocusEngine Hidden in iOS 9.1

Speaking of the intrepid developer Steven Troughton-Smith, last night on Twitter he uncovered that tvOS’s UIFocusEngine is built into iOS 9.1. That means, using private APIs, you can build an app for iPhone or iPad that has a UI that is entirely navigable using the keyboard — up, down, left, right, Return, Esc.

Steven sent me a small demo project so I could try it out, and it worked like a charm. For something that is clearly not even close to being ready for real-world use, it looks and feels pretty cool. The only hiccup I ran into is that there is no Esc key on the iPad Pro’s Smart Keyboard.

To be clear, this isn’t useful today, at all. Not only are they all private APIs, but the controls are only accessible through a hardware keyboard. So if you make a regular button with UIKit, it can be tapped (with your finger), but can’t be navigated to using a keyboard; if you make a button using UIFocusEngine, you can select it and trigger it using the keyboard, but it doesn’t respond to touch. But perhaps it’s a sign that Apple is thinking deeply about making iOS navigable using the keyboard — which is something they really need to do.

(One last note: I paired my SteelSeries Nimbus game controller to the iPad Pro. On Apple TV, you can use a game controller to navigate the entire UI. On iOS, it doesn’t work. It only works with an actual keyboard.)

Friday, 13 November 2015