Using ImageRenderer to Convert SwiftUI Views into Images
ImageRenderer is another new API for SwiftUI that comes with iOS 16. It allows you to easily convert any SwiftUI views into an image. The implementation is very simple. You instantiate an instance of ImageRenderer with a view for...
How to Use ShareLink for Sharing Data Like Text and Photos
In iOS 16, SwiftUI comes with a new view called ShareLink. When users tap on the share link, it presents a share sheet for users to share content to other applications or copy the data for later use. The ShareLink view is...
Optional Binding in Swift 5.7: A Shorter Version of if let
Other than all the new features of SwiftUI in iOS 16, Apple also announced Swift 5.7 which will come along with the release of Xcode 14. Let’s check out one minor but welcome change in Swift 5.7. Swift has the concept of...
Creating a Line Chart Using SwiftUI Charts API
The Charts framework is one of my favourite features for the new version of SwiftUI in iOS 16. Prior to iOS 16, you need to build your own charts or rely on third party library to render charts for you. With the release of this...
Enabling Developer Mode in iOS 16 for Xcode Development
Whether you just start learning iOS developement or have been building apps for years, you will need to deploy your app to a real iOS device for testing. In iOS 16, you need to perform a couple of configuration to enable...
How to Capture Text within Image Using Live Text API and SwiftUI
Last year, iOS 15 came with a very useful feature known as Live Text. You may have heard of the term OCR (short for Optical Character Recognition), which is the process for converting an image of text into a machine-readable text...
How to Display a Bottom Sheet Using SwiftUI
In iOS 15, Apple unveiled the UISheetPresentationController class for displaying an expandable bottom sheet in iOS apps. At the time, it’s only available in the UIKit framework. For SwiftUI, you either have to build your...
What’s New in SwiftUI 4 for iOS 16
Earlier this week, Apple kicked off WWDC 22. The SwiftUI framework continues to be one of the main focuses of the conference. As expected, Apple announced a new version of SwiftUI that comes along with iOS 16 and Xcode 14. This...
Language Detection and Text to Speech in SwiftUI Apps
With the advent of machine learning and artificial intelligence, the iOS SDK already comes with a number of frameworks for developers to develop apps with machine learning-related features. In this tutorial, let’s explore...
How to Create Confetti Animations in SwiftUI
From time to time, we received questions about how to create confetti animations. Undoubtedly, you can build the animation from the ground up using SwiftUI or UIKit. Recently I came across an open source library called...