Mastering the containerRelativeFrame Modifier in SwiftUI
At the WWDC 2023, Apple introduced the containerRelativeFrame view modifier to SwiftUI. This modifier simplifies some layout operations that were previously difficult to achieve through conventional methods. This article will delve into the containerRelativeFrame modifier, covering its definition, layout rules, use cases, and relevant considerations. At the end of the article, we will also create a backward-compatible replica of containerRelativeFrame for older versions of SwiftUI, further enhancing our understanding of its functionalities.
The @State Specter: Analyzing a Bug in Multi-Window SwiftUI Applications
In this article, we will delve into a bug affecting SwiftUI applications in multi-window mode and propose effective temporary solutions. We will not only detail the manifestation of this issue but also share the entire process from discovery to diagnosis, and finally, resolution. Through this exploration, our aim is to offer guidance to developers facing similar challenges, helping them better navigate the complexities of SwiftUI development.
Practical SwiftData: Building SwiftUI Applications with Modern Approaches
In the previous article "Concurrent Programming in SwiftData", we delved into the innovative concurrent programming model proposed by SwiftData, including its principles, core operations, and related considerations. This elegant programming solution has earned considerable praise. However, as more developers attempt to use SwiftData in actual SwiftUI applications, they have encountered some challenges, especially after enabling Swift's strict concurrency checks. They found that SwiftData's actor-based concurrency model is difficult to integrate with traditional application construction methods. This article will explain, in a tutorial-like manner, how to integrate SwiftData with modern programming concepts smoothly into SwiftUI applications and provide strategies to address the current challenges faced by developers.
Exploring Property Wrappers in SwiftUI: @UIApplicationDelegateAdaptor, @AccessibilityFocusState, @FocusedObject, @FocusedValue, and @FocusedBinding
In this article, we will explore property wrappers such as @UIApplicationDelegateAdaptor, @AccessibilityFocusState, @FocusedObject, @FocusedValue, and @FocusedBinding. These property wrappers cover various functionalities including integration across different framework lifecycles, assistive focus, and management of focused value observations.
Exploring SwiftUI Property Wrappers: @AppStorage, @SceneStorage, @FocusState, @GestureState and @ScaledMetric
In this article, we will continue to explore property wrappers in SwiftUI @AppStorage, @SceneStorage, @FocusState, @GestureState, and @ScaledMetric. These property wrappers cover various aspects including data persistence, interactive response, accessibility features, and multi-window support, providing developers with succinct and practical solutions.
Mastering TipKit: Advanced
In the article section, we introduced the basic usage of TipKit. In this article, we will discuss some advanced topics related to TipKit, such as how to fully customize the Tip view (without using TipView and popoverTip), how to use TipKit in UIKit, and how TipKit can share data between different applications. Finally, we will try to answer some common questions related to TipKit.
Mastering TipKit: Basics
TipKit is a framework introduced by Apple at WWDC 2023 that allows you to easily display tips in your applications. It can be used to introduce new features to users, help them discover hidden options, or demonstrate faster ways to accomplish tasks, among other scenarios. TipKit is compatible with different hardware environments and operating systems within the Apple ecosystem, including iPhone, iPad, Mac, Apple Watch, and Apple TV.
The Composable Architecture (TCA)
The Composable Architecture (TCA) is a SwiftUI framework that provides state and side effect management, testing and dependency injection. This article describes TCA's benefits, features, changes, learning, performance, and resources.
Creating Tables with Table in SwiftUI
Table is a table control provided for the macOS platform in SwiftUI 3.0, allowing developers to quickly create interactive multi-column tables. At WWDC 2022, Table was extended to the iPadOS platform, giving it a larger space to operate. This article will introduce the usage of Table, analyze its features, and how to implement similar functionality on other platforms.
SwiftUI Overlay Container 2: Customizable, Efficient, and Convenient View Manager
SwiftUI Overlay Container is a view container component for SwiftUI. It is a customizable, efficient, and convenient view manager. With just a simple configuration, the SwiftUI Overlay Container can handle basic tasks such as view organization, queue processing, transitions, animations, interactions, and display style configuration. This allows developers to focus more on the implementation of the application's views themselves.
SwiftUIOverlayContainer — A SwiftUI Library for Creating Customized Popup Views
SwiftUI currently offers popup views such as sheet, fullScreenCover, alert, action sheet, etc. to enrich UI interactions. However, the variety is somewhat limited. To write code for various popup windows more conveniently, I created a simple SwiftUI library — SwiftUIOverlayContainer.