Sponsored Link
Creatopy: AI-powered Ad Generation
Creatopy is a creative automation platform powered by AI, designed to help professionals create, customize, and scale ads. With its AI-driven tools, you can seamlessly build, manage, scale, and deliver ad campaigns.
By automating these processes, Creatopy saves time and frees up more room for creativity, making it easier to produce high-quality, effective ads.
Swift Around the Web
Simple state sharing and persistence in Swift
Sharing is a new open-source Swift library that simplifies state sharing and persistence, is designed for easy testing, and is compatible with SwiftUI, UIKit, and non-Apple platforms.
It offers a flexible @Shared
property wrapper for sharing state across different parts of your app and persisting it to various storage systems such as user defaults, file systems, or custom implementations.
Testing requirements with #require in Swift Testing
The #require
macro in Swift testing ensures specific conditions are met within a test. Unlike #expect
, #require
aborts the test if a condition fails.
The article demonstrates how using #require
to unwrap optionals, check boolean conditions, and assert error throwing. This macro helps create more focused and reliable tests.
Coding
Text field enhancements in SwiftUI
SwiftUI has improved text field functionality. On macOS, you can now scroll long text, programmatically select text, and use text suggestions.
Writing Tools features are also supported. These enhancements make text fields more versatile and user-friendly in SwiftUI.
SwiftUI matched the geometry effect in a custom-segmented control
Learn how to create a custom segmented control in SwiftUI using the matchedGeometryEffect
modifier to smoothly animate a background capsule as the user selects different options.
This approach offers a clean and efficient solution to build custom UI components in SwiftUI.
Enum explained in-depth with code examples in Swift
A detailed guide by Antoine on Swift enums, covers their basics, raw values, associated values, the CaseIterable
protocol, and their use with SwiftUI's ForEach
. Enums enhance code readability and safety.
The article demonstrates the use of enums to create a dynamic onboarding view in SwiftUI. By following the insights provided, you can effectively leverage enums to improve your Swift projects.
visionOS
Apple Design Resources - visionOS
Apple has released a visionOS design kit for Figma. This kit provides all the necessary UI components, styles, and resources to design realistic visionOS apps.
It includes pre-built components, text styles, color palettes, and more. Designers can use this kit to create stunning and functional visionOS app designs.
Apple News
Get your apps and games ready for the holidays
Apple reminds developers to prepare their apps and games for the upcoming holiday season on the App Store.
It advises submitting time-sensitive updates early due to potential review delays from December 20th to 26th. To ensure a smooth review process, developers are encouraged to submit their updates well in advance.
Design
Blooming fireworks with Metal and SwiftUI
Learn how to create a firework animation in SwiftUI using Metal shaders. This post covers setting up the SwiftUI view, defining the shader function, and implementing the animation logic.
The animation includes a trail effect with particles, a burst effect, and various optimizations for performance. While this approach offers flexibility, it's less performant than built-in SwiftUI effects.
Animate UIKit views with SwiftUI animations in iOS 18
Another great post by Natalia shows how iOS 18 allows you to use SwiftUI animations to animate UIKit views. This bridges the gap between the two frameworks.
The article demonstrates how to animate a UIImageView using a SwiftUI linear animation, enhancing animation capabilities in UIKit projects.
Other Cool Stuff
SwiftUI Experiments
This GitHub repository is a collection of SwiftUI experiments by a designer-turned-coder. It showcases a variety of interactive prototypes, including drag-to-delete interactions, map-based recommendations, and signature authentication.
Discovering iOS memory leaks III: Automating with Github Action
Learn to automate memory leak detection with the GitHub Action. The action sets up the environment, builds and installs the app, runs tests, uses leaks to identify leaks, and uploads reports.
Keeping parts of the text unchanged by Writing Tools
This post shows how to exclude specific parts of a UITextView from modifications in the Writing Tools.
By implementing the textView(_:writingToolsIgnoredRangesInEnclosingRange:) method, you can specify ranges of text to be preserved. This technique is useful for protecting parts of your text from unintended changes by Writing Tools.
Artificial intelligence (AI)
Artificial Intelligence for Beginners - A Curriculum
Microsoft offers free courses on neural networks consisting of 24 lessons designed to help you learn the basics of AI from scratch. The program covers modern neural architectures for working with text and images, including the latest models and their use in content generation.
It also explores classical approaches such as GOFAI, genetic algorithms, and multi-agent systems, along with key AI training concepts using TensorFlow and PyTorch. The courses include numerous practical and business cases and are accessible to everyone.
In Case You Missed It
SwiftUI: Create a Systemwide Custom Keyboard
To create a system-wide custom keyboard for iOS, add a "Custom Keyboard Extension" target to your project. Design your keyboard using SwiftUI and handle text input/deletion with textDocumentProxy.