Adding custom attribute to NSAttributedString on iOS

NSAttributedString is used for displaying rich text on Apple platforms. There are many attributes available for styling the text. Let's see how to add new attribute and how to draw it in UITextView. Drawing custom attribute Defining a new attribute is just a matter of extending NSAttributedString.Key and defining a new static variable. Difficult part …

Scanning text using SwiftUI and Vision on iOS

Apple's Vision framework contains computer vision related functionality and with iOS 13 it can detect text on images as well. Moreover, Apple added a new framework VisionKit what makes it easy to integrate document scanning functionality. For demonstrating the usage of it, let's build a simple UI what can present the scanner and display scanned …