Understanding TaskLocal in Swift Concurrency
TaskLocal is a mechanism within Swift’s concurrency system that allows you to store and access values that are local to a task and its child tasks. It’s similar to thread-local storage from the pre...
TaskLocal is a mechanism within Swift’s concurrency system that allows you to store and access values that are local to a task and its child tasks. It’s similar to thread-local storage from the pre...
When writing Swift code, you may encounter situations where you need to represent a combination of options in a clean, efficient, and type-safe manner. This is where Swift’s OptionSet comes into pl...
SwiftUI allow us to pass data from parent to child views via environment. But what if you need to send data from child views back to their parent? This is where SwiftUI preference comes in. prefere...
SwiftUI’s sheet modifier is a fantastic tool, but it comes with limitations: it doesn’t automatically resize to fit its content. Apple introduced the .presentationSizing(.fitted) modifier in iOS 18...
With the introduction of Swift’s new concurrency features and updates to the SwiftUI ecosystem, developers are continually provided with tools to write more declarative and efficient code. One such...
At WWDC24, Apple introduced a groundbreaking feature for Swift developers: noncopyable types. This enhancement expands Swift’s value ownership system, allowing developers to express intent more cle...
Creating a menu bar app may seem like a complicated task, but it’s actually quite simple. Here’s how you can get started. Basic SwiftUI App Structure Typically, you’d create a SwiftUI app using a...
With the release of iOS 18, SwiftUI introduces a powerful new way to create custom container views. Before diving into the implementation, it’s essential to understand the distinction between decl...
Introduced in iOS 17, the .visualEffect modifier offers a seamless way to apply dynamic visual effects to views. Unlike older methods, such as scaleEffect or offset, which could affect the layout o...
In SwiftUI, a transition defines how a view enters or exits the screen during animations. It enables smooth animations when adding or removing views in your app. For example: struct MyView: View...