Upgrade the UI with iOS 13
In WWDC 2019, Apple unveiled iOS 13 featuring Dark Mode, Apple Sign In, Performance Optimizations and more. From one of the keynotes, Modernizing Your UI for iOS 13, I picked three UI improvements that I thought were worth taking notes on. Although they are subtle changes, these incremental updates can get users to take and dismiss actions a tiny bit faster.
Sheets
The modal presentation style was updated from what was previously known in the UIModalPresentationStyle.pageSheet and .formSheet styles. Instead of filling the entire screen, the new sheet style leaves a gap at the top and sets the scaled-down view of the former page behind. This way, it gives users a sense of the context of where they are in the application. The top rounded corners of the sheet signify that users can dismiss it by dragging it downward. The new style is defined with UIModalPresentationStyle.automatic, which is the default state.
When users try to interact with modal, there are multiple APIs that are helpful for handling different conditions. For example, although sheets get dismissed as users pull down as default behavior, sheets won’t get dismissed when a user alters the content without saving or deleting. In this instance, the sheets present contextually relevant actions first.
The isModalInPresentation is a property in UIViewController and when it is set to true, the modal cannot be dismissed. The presentationControllerDidAttemptToDismiss method may be called in this case as users pull down the sheet and release, so desired actions can be presented in this method.
Gestures
In iOS13, some gesture improvements are available without rewriting existing older applications. Multi-selection can be instantly available with 2-finger drags in table and collection views. If users’ devices are connected to hardware keyboards, multi-selection can be accessed by holding the shift key.
3-finger gestures drastically improve productivity in iOS 13. For example, users can undo by swiping toward their left, and redo by swiping toward their right with three fingers. In addition, users can now pinch-in to copy and pinch-out to paste text using three fingers.
Context Menus
Context menus, supported in iOS13, give people access to content preview and contextually relevant commands without leaving the current view. The concept is similar to Peek and Pop, supported on devices with 3D touch, but it is enhanced providing a smoother experience.
With UIContextMenuInteraction, the context menu provides a rich preview and optional nested actions with available gestures beyond 3D touch. Users can access the context menu with 3D touch, haptic touch, long press, and right-click for MacOS.
With UITargetedPreview and UITargetedDragPreview, drag animations, preview, or background can be customized. For example, a custom icon can be shown instead of a preview sheet.