autolayout
Generated on 9/26/2024
1 search
Auto Layout is a key feature in both UIKit and SwiftUI for creating dynamic and adaptive user interfaces. At WWDC 2024, several sessions discussed improvements and techniques related to layout management:
-
Dynamic Type in SwiftUI: The session "Get started with Dynamic Type" explains how to use the
dynamicTypeSize
environment keypath in SwiftUI to create layouts that adapt to different text sizes, especially for accessibility. This involves usingAnyLayout
to switch betweenHStack
andVStack
layouts based on the text size category. Get started with Dynamic Type (06:00). -
Automatic Trait Tracking in UIKit: The session "What’s new in UIKit" introduces automatic trait tracking in iOS 18, which simplifies handling layout changes by automatically tracking and responding to trait changes, such as size class changes, without manual registration. This feature enhances performance by only creating necessary trait dependencies. What’s new in UIKit (06:02).
-
List Improvements in UIKit: The same session also covers updates to collection and table view APIs, making it easier to update cells and manage list environments. This includes new configurations for headers and footers that automatically update based on the list environment trait. What’s new in UIKit (07:44).
These sessions provide insights into how Apple is enhancing layout capabilities across its platforms, making it easier for developers to create responsive and accessible interfaces.
Migrate your TVML app to SwiftUI
SwiftUI helps you build great apps on all Apple platforms and is the preferred toolkit for bringing your content into the living room with tvOS 18. Learn how to use SwiftUI to create familiar layouts and controls from TVMLKit, and get tips and best practices.
SwiftUI essentials
Join us on a tour of SwiftUI, Apple’s declarative user interface framework. Learn essential concepts for building apps in SwiftUI, like views, state variables, and layout. Discover the breadth of APIs for building fully featured experiences and crafting unique custom components. Whether you’re brand new to SwiftUI or an experienced developer, you’ll learn how to take advantage of what SwiftUI has to offer when building great apps.
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.
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 AppKit
Discover the latest advances in Mac app development. Get an overview of the new features in macOS Sequoia, and how to adopt them in your app. Explore new ways to integrate your existing code with SwiftUI. Learn about the improvements made to numerous AppKit controls, like toolbars, menus, text input, and more.