Prepare your tvOS apps for Dynamic Type
Learn how to support tvOS 27 Large Text by replacing fixed typography and constraints with Dynamic Type styles and adaptive layouts.
TL;DR
- tvOS 27 adds system-wide Large Text support; UIKit and SwiftUI standard controls can scale automatically when apps use Dynamic Type-compatible text styles.
- Common fixes include removing hard-coded font sizes, widths, heights, and rigid constraints that cause truncation or clipping at larger text sizes.
- SwiftUI apps can inspect
dynamicTypeSizeto adjust grids, carousels, and card layouts for accessibility sizes. - UIKit apps should use preferred text styles, enable
adjustsFontForContentSizeCategory, and respond toUITraitPreferredContentSizeCategorychanges for layout updates.
Large Text on tvOS 27
Large Text support is available system-wide on tvOS 27, bringing Dynamic Type-style text scaling to tvOS apps. People enable it in Settings under Accessibility, Display, Text Size, with sizes ranging from Large through Accessibility XXXL.
Apps that support Larger Text can indicate that support in their Accessibility Nutrition Labels for tvOS in the App Store. Standard UIKit and SwiftUI components such as labels, buttons, and navigation tab bars handle much of the scaling automatically, but custom UI needs review.
Find common Dynamic Type issues
The main problems to look for are fixed font sizes, fixed dimensions, and rigid constraints. These often appear in custom text elements or media-detail layouts designed around predictable dimensions, and they can cause text truncation, clipped controls, or inadequate spacing when text grows.
The recommended migration is to use semantic text styles and flexible layout constraints so text can grow with the user's setting.
- Search for hard-coded font sizes and replace them with standard text styles.
- Search for hard-coded width and height constraints that limit text growth.
- Check padding and spacing around controls after scaling, not just the text itself.
- Test at the largest Large Text sizes, not only the default size.
Use standard SwiftUI text styles and flexible width
Replace a fixed font and fixed 300-point width with a semantic caption style and a flexible maximum width.
VStack(spacing: 20) {
Text("Signup information")
.font(.caption.bold())
.lineLimit(1)
.foregroundStyle(.secondary)
.frame(maxWidth: .infinity, alignment: .leading)
HStack(alignment: .top, spacing: 40) {
/* ... */
}
}Use Dynamic Type text styles in UIKit
UIKit labels need a preferred text style plus adjustsFontForContentSizeCategory so they update when the content size category changes.
// Before: hard-coded size
titleLabel.font = UIFont.boldSystemFont(ofSize: 28)
// After: Dynamic Type-compatible style
titleLabel.font = UIFont.preferredFont(forTextStyle: .headline)
titleLabel.adjustsFontForContentSizeCategory = trueAdapt media grids and carousels
Media interfaces often need more than font scaling. A shelf or carousel that shows six posters at a standard text size may not leave enough horizontal room for larger titles. In SwiftUI, read dynamicTypeSize from the environment and use it to adjust layout parameters such as the number of visible cells.
The session's example reduces a horizontal movie shelf from six cells to four cells at accessibility sizes, giving each poster title more width. For very long text, consider a custom marquee strategy.
Adjust visible cells based on Dynamic Type size
Use dynamicTypeSize.isAccessibilitySize to give each carousel item more room when larger text is enabled.
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
)
}
}
}
}
}Switch layouts for accessibility sizes
Some content cards need a structural layout change at larger text sizes. A horizontal card with an image, title, and subtitle can become cramped when text scales. Switching to a vertical layout lets text use the full card width and allows cells to grow taller.
SwiftUI can use AnyLayout to choose between HStackLayout and VStackLayout. UIKit can update a UIStackView axis based on preferredContentSizeCategory.isAccessibilityCategory and register for trait changes so the layout updates while the app is running.
Conditional SwiftUI layout with AnyLayout
Switch from horizontal to vertical card content when accessibility text sizes are active.
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 {
/* ... */
}
}
}UIKit adaptive stack view layout
Respond to content size category changes by updating UIStackView.axis.
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
}
}
}Implementation checklist
- Use standard text styles instead of hard-coded font sizes.
- Replace fixed widths and heights with flexible constraints where text needs to grow.
- Test the app systematically with Large Text enabled on tvOS, including the largest accessibility sizes.
- Adapt grids, shelves, carousels, and cards when scaling alone does not preserve legibility.
- Declare Larger Text support in the app's Accessibility Nutrition Labels for tvOS when the app properly supports it.
Resources
Related Sessions
Refine accessibility for custom controls
Make SwiftUI custom controls work with VoiceOver and other assistive technologies using labels, values, adjustable actions, passthrough gestures, custom actions, and Direct Touch.
Accessibility Technologies Group Lab
Online WWDC26 lab for discussing accessibility technology announcements with Apple engineers and designers.