SwiftUI 변경사항

Generated on 10/29/2024

1 search

At WWDC 2024, several updates and new features were introduced for SwiftUI. Here are some of the key changes:

  1. Graphics Capabilities: SwiftUI now allows for more advanced graphics, including a new mix modifier on colors that lets you blend colors together by a specified amount. Additionally, custom shaders can now be precompiled to avoid frame drops caused by lazy shader compilation.

  2. Scroll View Enhancements: There are new APIs for more granular control over scroll views. You can now react to changes in content, offsets, and content size with the onScrollGeometryChange feature. This allows for dynamic experiences, such as auto-playing videos when content moves on or off the screen.

  3. Text Selection and Suggestions: SwiftUI now offers programmatic access to text selection within text editing controls. You can also add text suggestions to any text field, which appear as a dropdown menu.

  4. Swift 6 Language Mode: SwiftUI has improved its APIs to support the new Swift 6 language mode, which includes compile-time data race safety. Views in SwiftUI are now marked with the main actor annotation, meaning they are isolated to the main actor by default.

  5. Interoperability Improvements: There have been significant improvements in the integration of gestures and animations between SwiftUI and other frameworks like UIKit and AppKit. You can now use any built-in or custom UI gesture recognizer in your SwiftUI view hierarchy.

For more detailed information, you can refer to the session What’s new in SwiftUI (16:18) which covers scrolling enhancements and other updates.

Platforms State of the Union

Platforms State of the Union

Discover the newest advancements on Apple platforms.

Elevate your tab and sidebar experience in iPadOS

Elevate your tab and sidebar experience in iPadOS

iPadOS 18 introduces a new navigation system that gives people the flexibility to choose between using a tab bar or sidebar. The newly redesigned tab bar provides more space for content and other functionality. Learn how to use SwiftUI and UIKit to enable customization features – like adding, removing and reordering tabs – to enable a more personal touch in your app.

Get started with HealthKit in visionOS

Get started with HealthKit in visionOS

Discover how to use HealthKit to create experiences that take full advantage of the spatial canvas. Learn the capabilities of HealthKit on the platform, find out how to bring an existing iPadOS app to visionOS, and explore the special considerations governing HealthKit during a Guest User session. You’ll also learn ways to use SwiftUI, Swift Charts, and Swift concurrency to craft innovative experiences with HealthKit.

What’s new in SwiftUI

What’s new in SwiftUI

Learn how you can use SwiftUI to build great apps for any Apple platform. Explore a fresh new look and feel for tabs and documents on iPadOS. Improve your window management with new windowing APIs, and gain more control over immersive spaces and volumes in your visionOS apps. We’ll also take you through other exciting refinements that help you make expressive charts, customize and layout text, and so much more.

SwiftUI essentials

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.