KD Knowledge Diet·Jan 1, 2025Simplifying Codable Implementation in Swift Using Property WrappersDealing with diverse encoding and decoding requirements for specific fields in a Swift struct can often lead to cumbersome and error-prone…A response icon1A response icon1
KD Knowledge Diet·Dec 29, 2024Using if/else Statements as Expressions in Swift 5.9Swift 5.9, introduced with Xcode 15, brings a powerful feature that allows developers to use if/else statements as expressions. This…A response icon2A response icon2
KD Knowledge Diet·Dec 24, 2024Customize the style of links embedded in TextSince iOS 15 and macOS 12 we can embed links inside Text views in SwiftUI using Markdown or AttributedString.
KD Knowledge Diet·Dec 19, 2024Setting Custom Actions for Links in SwiftUI Text ViewsStarting with iOS 15 and macOS 12, SwiftUI Text views offer the ability to include interactive links created with Markdown or…
KD Knowledge Diet·Dec 14, 2024Enabling Text Selection for Non-Editable Text in SwiftUIText selection is a crucial feature in user interfaces, allowing users to interact with and manipulate text content. In SwiftUI, you can…A response icon1A response icon1
KD Knowledge Diet·Dec 9, 2024Nil Coalescing for Optionals in Debug PrintsIn Swift, working with Optionals is a common practice, and debugging your code often involves printing the values of these Optionals. To…
KD Knowledge Diet·Dec 9, 2024State Restoration for DisclosureGroup Expansion in SwiftUI List RowsState restoration is crucial for providing a seamless user experience when working with complex SwiftUI interfaces. While it’s…
KD Knowledge Diet·Dec 4, 2024Re-indenting Code in XcodeMaintaining consistent code formatting is essential for readability and maintainability in any software development project. Xcode, the…
KD Knowledge Diet·Nov 29, 2024Markdown in SwiftUI Text ViewsStarting with iOS 15 and macOS 12, SwiftUI Text views have built-in support for parsing Markdown when created with a `LocalizedStringKey`…
KD Knowledge Diet·Nov 24, 2024Resizing SF Symbols in SwiftUISF Symbols have become an essential part of iOS and macOS app design, providing a consistent set of scalable icons. In SwiftUI, you can…