7.8 · Keyboard shortcuts, pointer, Apple Pencil and multitasking

iPad apps share most of UIKit with the iPhone, and then add keyboards, trackpads, a pencil and resizable windows. The expectations are different: the app must work with whatever input is present.

Mental model. Do not assume a finger. Handle input through actions (commands, gestures, menus) that any device can trigger, and let the window decide its size.

Beyond touch

Keyboard shortcuts, pointer and the pencil.

  1. How do you support hardware keyboards, shortcuts, menus and the pointer on iPad? 7.8.1 · L3
    Make every action reachable beyond a tap. Keyboard shortcuts come from UIKeyCommand: declare an input and modifierFlags (such as .command) and an action, and…
  2. How do you handle Apple Pencil input, and how does multitasking change your layout assumptions? 7.8.2 · L5
    Apple Pencil arrives as ordinary touches with extra information. A UITouch has a type (.pencil versus .direct), force, altitudeAngle and azimuthAngle. Because…

More in UIKit