What’s New in tvOS 12

WWDC 2018

Posted by Den on September 26, 2018 · 13 mins read
What’s New in tvOS 12

What’s New in tvOS 12

WWDC 2018

What’s New in tvOS 12

WWDC 2018

Password AutoFill

  • Ensure QuickType bar appears
  • Get your app’s credentials on the QuickType bar
  • Enable 1-tap sign in

Ensure QuickType Bar Appears

Adopt UITextContentType

  • tvOS wil try to automatically detect username and password fields
  • Explicitly mark the text field types

QuickType Bar Suggestions

Associated Domains

Enable 1-Tap Sign In

Implement preferredFocusEnvironments

  • AutoFill will perform a focused button’s action after filling
  • Implement preferredFocusEnvironments to provide your login button for focus

Focus on tvOS

Focus Engine now supports apps regardless of how they are rendered ( new )

What’s Included

  • State management
  • Focus item geometry
  • Accessibility
  • tvOS’s native feel
    - Momentum during swipes
    - Scrolling inertia
    - Focus movement hinting

New Focus Features

UIFocusEnvironment ( new )

  • Hooking into the focus engine
  • Controlling and reacting to focus updates
  • Focus updating functions

UIFocusItemContainer ( new )

  • Provide a coordinateSpace
    - UIView provides itself
  • Implement focusItems(in rect: CGRect)
  • rect is expressed in coordinateSpace
  • Focus Items’ frames must also be expressed in coordinateSpace

UIFocusItem ( new )

  • Inherits from UIFocusEnvironment
  • Implement canBecomeFocused
  • Implement didHintFocusMovment(_ hint: UIFocusMovmentHint)
  • Provide a frame
    - Same coordinate space as its containing UIFocusItemContainer

UIFocusMovementHint ( new )

UIFocusItemScrollableContainer ( new )

  • Inherits from UIFocusItemContainer
  • 3 additional properties
  • contentOffset is set automatically

Accessibility

Demo 1

Demo 2

Demo 3

Text Scrolling ( new )

Marquee

  • Present variable-length strings in fixed geometry
  • Visually highlights current focus

TVUIKit ( new )

  • Easy adoption of common UI patterns
  • Built-in support for localization and accessibility
  • Developer Beta

TVPosterView ( new )

TVCaptionButtonView ( new )

TVCardView ( new )

TVMonogramView ( new )

Common Theme ( new )

TVLockupView ( new )

  • Custom content
  • Your own widget that responds to focus
  • Customize 4 special purpose subclasses
    - TVPosterView
    - TVCaptionButtonView
    - TVCardView
    - TVMonogramView

TVDigitEntryViewController

Demo 1

Demo 2