What’s New in tvOS 12
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
- Powers many other features
- Strong relationship between app and website
- Introducing Password AutoFill for Apps ( WWDC 2017 )
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 incoordinateSpace
- 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
- It’s incredibly easy !
- Implement
UIFocusItemContainer.focusItems(in rect: CGRect)
- Set
accessibilityLabel
andaccessibilityHint
on your Focus Items - What’s New in Accessibility ( WWDC 2016 )
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