SwiftUI View Preferences
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 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...
SwiftUI is built on three core principles: Identity, Lifetime, and Dependencies. These principles work together to help SwiftUI manage views efficiently: Identity: How SwiftUI recognizes elemen...
Intro Swift Concurrency is a powerful framework introduced in Swift 5.5 that simplifies writing asynchronous and concurrent code, making it safer, more readable, and easier to maintain. Built arou...