self-sizing cells
Asked on 2025-09-05
1 search
The concept of self-sizing cells is closely related to the use of Dynamic Type in iOS development, which allows text and other UI elements to adjust their size based on user preferences and accessibility settings. At WWDC, Apple has discussed various techniques to ensure that apps can adapt to different text sizes and layouts dynamically.
In the session Get started with Dynamic Type, Apple explains how to create dynamic layouts that adjust when text size changes. This involves using environment keypaths and properties like AnyLayout
in SwiftUI to switch between different layout configurations (e.g., HStack
and VStack
) based on the selected text size. This ensures that content remains readable and accessible, even at larger text sizes.
For UIKit, the session also covers how to use UIStackView
to manage layout changes in response to text size adjustments. By subscribing to notifications like UIContentSizeCategoryDidChangeNotification
, developers can update their layouts dynamically to accommodate larger text sizes.
These techniques are essential for creating flexible and adaptive user interfaces that provide a great user experience across different device settings and user preferences.

Make your UIKit app more flexible
Find out how your UIKit app can become more flexible on iPhone, iPad, Mac, and Apple Vision Pro by using scenes and container view controllers. Learn to unlock your app’s full potential by transitioning from an app-centric to a scene-based lifecycle, including enhanced window resizing and improved multitasking. Explore enhancements to UISplitViewController, such as interactive column resizing and first-class support for inspector columns. And make your views and controls more adaptive by adopting new layout APIs.

Get started with Dynamic Type
Dynamic Type lets people choose their preferred text size across the system and all of their apps. To help you get started supporting Dynamic Type, we’ll cover the fundamentals: How it works, how to find issues with scaling text in your app, and how to take practical steps using SwiftUI and UIKit to create a great Dynamic Type experience. We’ll also show how you can best use the Large Content Viewer to make navigation controls accessible to everyone.

What’s new in UIKit
Explore everything new in UIKit, including tab and document launch experiences, transitions, and text and input changes. We’ll also discuss better-than-ever interoperability between UIKit and SwiftUI animations and gestures, as well as general improvements throughout UIKit.