Swift - KeyPaths
Introduced with Swift 4, the KeyPath type is a powerful feature that enables us to store a type’s property and defer its evaluation. public class KeyPath<Root, Value>: PartialKeyPath<Root> { @usableFromInline...
Swift - @autoclosure
While closures are a powerful way to capture and store references within a specific context, the heavy-weight syntax using curly brackets may sometimes lead to confusion and code misinterpretation. The...
SwiftUI - Integrating UIKit
SwiftUI doesn’t provide neither a UICollectionView nor a UIActivityIndicator equivalence so we need to integrate the components directly from UIKit. Apple’s built-in solution to address this issue is the UIViewRepresentable...
SwiftUI - Connecting the models
The MVVM architecture is a perfect fit for SwiftUI as one can make a view model conform the ObservableObject and mark its underlying properties as @Published so that views always...
SwiftUI - Networking
A view will often use an observable object to reflect the latest data fetched from a web-service. Apple has introduced the Combine framework, a way to handle asynchronous events by...