View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Videos

Open Menu Close Menu
  • Collections
  • All Videos
  • About

Back to WWDC26

  • About
  • Summary
  • Transcript
  • Code
  • Prepare your tvOS apps for Dynamic Type

    Dynamic Type empowers people to comfortably read and interact with your app by letting them choose the text size that works best for them. You'll learn how to get your app ready for Dynamic Type on tvOS through practical techniques for implementing font scaling and adapting your layouts for larger content. You'll also discover how to optimize your media-focused interfaces like grids and carousels, ensuring a great experience for everyone who relies on different text sizes.

    Chapters

    • 0:01 - Introduction
    • 2:46 - Identify common issues
    • 6:13 - Adapt your layout

    Resources

    • Applying custom fonts to text
    • Scaling fonts automatically
      • HD Video
      • SD Video

    Related Videos

    WWDC24

    • Get started with Dynamic Type
  • Search this video…

    Hi, I'm Isis, and I'm an engineering manager on the accessibility team. This year, there is great news for accessibility on tvOS 27. Large Text support is now available, bringing system-wide text scaling to every app on the platform. Many people need or prefer different text sizes, and making your app dynamic helps everyone get a great experience. Your tvOS app customers have been waiting for this accessibility feature. And I'll show you how to make the most out of it in your apps. In addition, you'll be able to indicate support for Larger Text in your Accessibility Nutrition Labels for tvOS in the App Store. This is a great way to reach users who specifically look for accessible apps that support larger text.

    In this session, I'll start by covering how Large Text works on tvOS and where people can find it. Then, I'll go into identifying small parts of your app that you may need to adjust for larger text sizes.

    And finally, I'll touch on a few examples of how to adapt layout in response to text size.

    Let's start with an overview. If you're familiar with Dynamic Type on iOS, you have a head start! Dynamic Type works the same way on tvOS.

    UIKit and SwiftUI can adapt text sizes automatically based on what someone prefers. This gives people control over the text size to match their needs and comfort.

    People can turn on larger text sizes in the Settings app. By navigating to Accessibility, Display, then Text Size.

    They'll have the option of choosing text sizes starting at Large all the way up to Accessibility XXXL. I'm working on a media app that lets people discover and watch their favorite movies. Here's how this app adapts to these larger text sizes. This media app has a tab bar at top for navigation. There's a large title, with a few action buttons, and a gallery of movie posters to explore in a collection view below that.

    With larger text sizes turned on, the navigation title at the top has become much larger.

    In the tab bar, each label is now bigger, and all of the text throughout the interface has scaled up significantly. Standard UIKit and SwiftUI components like Labels, Buttons and Navigation tabBars handle this automatically. For your apps, your job is just to identify and update any custom elements that may need attention. When examining your app with Large Text, there are a few types of issues to identify. When your app runs with larger text sizes, you'll want to ensure that you avoid fixed font sizes that don't allow your text to scale.

    Interfaces that don't adapt to dynamic type, like hard-coded sizes or constraints, may cause issues like truncation of text or clipping of UI elements.

    You may also need to adjust layouts for the padding and spacing needed when some elements grow to larger sizes.

    Here's an example from my media app where the description of a movie is displayed.

    There is a title shown at the top, with text labels and controls towards the bottom.

    With text set to the largest size, most of the text has grown larger… But, there's one text element on the left that isn't scaling. That is the caption that reads "Signup information" above the controls that let someone sign up, buy, or rent a movie. Now, a caption like this may have hard-coded text sizes for a specific layout reason. For example, it might have originally been in a container with static dimensions or rigid constraints. While this can seem appealing for creating predictable layouts, it's not recommended. This approach lacks flexibility and can't adapt to larger text. Instead, adapt the layout to be flexible and remove the hard-coded values. Here is the code representing the Description View of my media app.

    It has a VStack, containing the "Signup information" caption, and an HStack containing the buttons and other text information about the movie. This code contains a few different challenges for larger text. It specifies a fixed font size, which will not adapt when someone changes their size preference.

    And on the Text view, there is a fixed width constraint to 300 points.

    As text grows, 300 points may not be wide enough for the text, which could lead to text truncation.

    To make this caption adjust to larger text sizes, I'll replace the hard-coded font style with a semantic text style. In this case, I'll use "caption".

    With those changes, the text size is now dynamically growing, but the content is now truncated.

    To fix this, replace fixed widths with flexible constraints that let the view grow as needed.

    On the text view, I'll replace the fixed width with the parameter maxWidth and set it to infinity. This tells SwiftUI to use as much width as needed for the content.

    With those changes, my text view scales beautifully with larger text, and has enough space to display its content. Perfect! To find these types of common issues in your app, search for hard-coded text sizes and migrate to standard styles instead.

    Search your app for hard-coded height and width constraints and use flexible constraints to allow your content to grow.

    If you're using UIKit, the approach is similar with one additional step. Replace hard-coded fonts with text styles, and set adjustsFontForContentSizeCategory to true. This tells UIKit to automatically update when preferences change.

    Sometimes fixing hard-coded values isn't enough. You may want to adapt the layout in response to larger text, while preserving the original layout for default sizes.

    Consider this collection view. It contains six movie posters with a title underneath each. With a standard text size, the full title fits comfortably in the space below the image.

    With Large Text enabled, there isn't enough room to fit six titles horizontally. This layout will need to be adapted when the text is larger. Here is the SwiftUI code for the view. It presents a horizontal scroll view, with a LazyHStack. Inside a container, I have a button for each cell.

    To adapt this layout, I will first read the dynamicTypeSize environment key path. Then, I'll change the columnCount parameter on the cell in the containerRelativeFrame modifier.

    When larger text sizes are enabled, I'll set the layout to show 4 columns at a time, instead of 6.

    This provides wider cell dimensions and gives each title more room to grow. To accommodate even longer text, consider a custom marquee strategy.

    Here's another example where I'll adjust layout in this app. This part of my app contains cards for different types of content, like a video of a beach, or a video of camping.

    Each of these content cards contains an image, the title, and a subtitle. With larger text, there isn't enough visual padding between elements, and text is easily truncated with the space that it has.

    One solution is to provide a conditional layout for when larger sizes are turned on. Here's how a conditional layout can be achieved in SwiftUI.

    First, read the dynamicTypeSize environment value to detect when accessibility sizes are turned on.

    Then, create a VStackLayout or an HStackLayout depending on whether larger text is being used. AnyLayout lets you abstract over these two types. Use the new layout like any other stack. It will dynamically switch between horizontal and vertical depending on the text size.

    In UIKit, use UIStackView and update the axis property based on preferredContentSizeCategory. isAccessibilityCategory.

    Call registerForTraitChanges and pass UITraitPreferredContentSizeCategory to update your layout in response to size changes while your app is running.

    Here it is in action in my app's content cards. When larger text sizes are enabled, the layout switches to a vertical stack. This lets the title and subtitle grow to the entire width of the cell, rather than sharing the width with the image. This layout also allows the cells to become taller to provide more room for the content.

    Now you're ready to test your app with larger text sizes on tvOS. Discover where you can make refinements by using system text styles and tailoring your layouts to prioritize text legibility.

    Here's your action plan. Use standard text styles instead of hard-coded fonts.

    Test systematically with Large Text enabled.

    Adapt layouts when needed for best experience. And indicate support for Larger Text in your app's Accessibility Nutrition Labels for tvOS.

    Now it's your turn to make your tvOS app accessible for everyone! Thanks for watching!

    • 4:58 - Adopt standard text styles

      // Adopt standard text styles
      
      VStack(spacing: 20) {
        Text("Signup information")
          .font(.caption.bold())
          .lineLimit(1)
          .foregroundStyle(.secondary)
          .frame(width: 300, alignment: .leading)
        HStack(alignment: .top, spacing: 40) { 
            //* ... *//
        }
      }
    • 5:10 - Use flexible constraints

      // Adopt standard text styles
      
      VStack(spacing: 20) {
        Text("Signup information")
          .font(.caption.bold())
          .lineLimit(1)
          .foregroundStyle(.secondary)
          .frame(maxWidth: .infinity, alignment: .leading)
        HStack(alignment: .top, spacing: 40) { 
            /* ... */
        }
      }
    • 5:55 - Dynamic Type with text styles in UIKit

      // Hard coded text size in UIKit
      
      titleLabel.font = UIFont.boldSystemFont(ofSize: 28)
      
      // Dynamic Type with text styles in UIKit
      
      titleLabel.font = UIFont.preferredFont(forTextStyle: .headline)
      titleLabel.adjustsFontForContentSizeCategory = true
    • 7:09 - Adapt layout in response to dynamic type

      // A view that shows a collection of movie posters
      
      struct MovieShelf: View {
        @Environment(\.dynamicTypeSize) private var dynamicTypeSize
        var body: some View {
          ScrollView(.horizontal) {
            LazyHStack(spacing: 40) {
              ForEach(Asset.allCases) { asset in
                Button { 
                  /* ... */
                } label: {
                  asset.portraitImage
                  Text(asset.title)
                }
                .containerRelativeFrame(
                  .horizontal,
                  count: dynamicTypeSize.isAccessibilitySize ? 4 : 6,
                  spacing: 40)
              }
            }
          }
        }
      }
    • 8:07 - Provide a conditional layout for when larger sizes are turned on

      // A view that shows content in a card
      
      struct CardContentView: View {
        @Environment(\.dynamicTypeSize) private var dynamicTypeSize
        var asset: Asset
      
        var body: some View {
          let layout = dynamicTypeSize.isAccessibilitySize ?
            AnyLayout(VStackLayout(alignment: .leading, spacing: 10)) :
            AnyLayout(HStackLayout(alignment: .top, spacing: 10))
          layout {
            /* ... */
          }
        }
      }
    • 8:31 - UIKit adaptive layout that responds to content size changes

      // UIKit adaptive layout that responds to content size changes
      
      class AdaptiveLayoutViewController: UIViewController {
        let stackView = UIStackView()
        
        override func viewDidLoad() {
          super.viewDidLoad()
          updateLayout()
      
          let sizeTraits: [UITrait] = [UITraitPreferredContentSizeCategory.self]
          registerForTraitChanges(sizeTraits, action: #selector(updateLayout))
        }
      
        private func updateLayout() {
          if traitCollection.preferredContentSizeCategory.isAccessibilityCategory {
            stackView.axis = .vertical
          } else {
            stackView.axis = .horizontal
          }
        }
      
      }
    • 0:01 - Introduction
    • Large Text support is now available system-wide on tvOS 27, allowing apps to automatically scale text to match someone's needs and preferences. By supporting Dynamic Type, your app can adapt its layout and display its accessibility support in its Accessibility Nutrition Labels.

    • 2:46 - Identify common issues
    • When accommodating larger text, avoid fixed font sizes and rigid constraints that prevent text from scaling and cause truncation or clipping. Ensure all UI elements are flexible and responsive rather than relying on hardcoded values that break layouts at larger sizes.

    • 6:13 - Adapt your layout
    • Find and replace hardcoded sizes with standard text styles to allow interfaces to grow. In cases where standard scaling isn't enough, adapt your view's layout dynamically—such as reducing the number of columns in a grid—by checking the current `dynamicTypeSize` environment value.

Developer Footer

  • Videos
  • WWDC26
  • Prepare your tvOS apps for Dynamic Type
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines