Swift Discovery #17
Welcome to another issue of Swift Discovery newsletter. This week we have many new interesting articles and open source frameworks
Articles
@Observable Macro performance increase over ObservableObject
The @Observable Macro enhances SwiftUI views by streamlining the code during implementation and boosting performance through the reduction of unnecessary redraws.
Introducing SwiftUI on visionOS
Learn the basic of SwiftUI on visionOS, covering Window, Volume and Space
Inspectors in SwiftUI
The inspector(isPresented:content:) modifier functions differently across platforms: on macOS and iPadOS, it adds a column to the trailing edge of the window, while on the iPhone and in the compact horizontal size class on iPad, it defaults to a sheet.
SwiftUI NavigationSplitView
The NavigationSplitView is a versatile SwiftUI component designed for optimal navigation across all Apple platforms. If you're curious about its functionality or how to implement it, this article provides an excellent starting point to explore and understand the NavigationSplitView.
Using TipKit on a SwiftUI app
This tutorial is designed to guide you through the process of creating and displaying effective tips within an application built using SwiftUI, utilizing the capabilities of TipKit.
SwiftUI geometryGroup() Guide
During WWDC 2023, Apple unveiled a new SwiftUI modifier named geometryGroup(). This modifier is specifically aimed at resolving certain animation issues which were either challenging or impossible to manage previously.
Custom Traits and SwiftUI
Starting with iOS 17 you can add your own custom traits to the UIKit trait environment and have them interoperate with the SwiftUI environment.
Crafting better App Icons
Learn the key aspects behind crafting better App Icons on different Apple platforms.
Remove background from image in SwiftUI
Eliminating backgrounds from images has become remarkably straightforward with the new iOS 17 API — VNGenerateForegroundInstanceMaskRequest. Buckle up, as we're about to embark on an exciting journey to learn how to use it!
Adapting your App Icon to visionOS
The app icon in visionOS features a circular design, with a background layer and one or two non-background layers on top. This composition creates a three-dimensional effect
Adding AI-generated image description to Ice Cubes
When integrating photo uploads in Ice Cubes, users can now effortlessly obtain an image description with a single tap, thanks to the new OpenAI Vision API. This may seem like magic, but it's grounded in technology
AnyView’s impact on SwiftUI performance
AnyView, a type-erased view in SwiftUI, proves useful in containers that hold a mix of different view types. This can simplify your code significantly. However, it's important to note that this convenience might lead to a compromise in performance.
Video
SwiftUI Shine Effect
Learn how to create a custom view modifier which will add shining effect to the applied view Using SwiftUI
Expert Advice for Your Apple Search Ads and ASO Questions
Apple's and Google's search algorithms are black boxes and completely undocumented, but when you look at enough ASO data, patterns start to emerge.
Open source
Vortex
Vortex is a powerful, high-performance particle system library for SwiftUI, allowing you to create beautiful effects such as fire, rain, smoke, and snow in only a few lines of code.
RichEditorSwiftUI
RichEditorSwiftUI is swift based library, it is made to make rich text editing easy with SwiftUI.