Notepad App in Swift
Scratch pad is much the same as some other UITextView, however you have to utilize the accommodation initializer to utilize the subjects. To make another topic, duplicate one of the current subjects and alter the JSON.
Look at the Xcode venture for a case. For full documentation read the code.
Extending an Existing Text View with Notepad Features
In the event that you can't work with the Notepad subclass straightforwardly for reasons unknown, you can set up a current UITextView or NSTextView all alone.
For iOS, you need to introduce all TextKit segments yourself. Take the accompanying as an outline where you can swap in custom items:
And for macOS:
Using regex, you can match custom patterns in your Notepad editor by passing a regex attribute in your theme. For example, one that highlights Twitter handles in a teal color:
Copy the source from the Notepad folder to your project, or add Notepad to your Podfile if you're using CocoaPods.