From 5d34a193f0f38ab8237c52886af1ad5fce440e46 Mon Sep 17 00:00:00 2001 From: Dmytro Denys <7foots@gmail.com> Date: Mon, 13 Jun 2022 13:02:03 +0300 Subject: [PATCH] Support TextView Insertion Point Color on Mac Catalyst --- Sources/Sourceful/View/SyntaxTextView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/Sourceful/View/SyntaxTextView.swift b/Sources/Sourceful/View/SyntaxTextView.swift index 6c7605f..6f6cc27 100644 --- a/Sources/Sourceful/View/SyntaxTextView.swift +++ b/Sources/Sourceful/View/SyntaxTextView.swift @@ -84,7 +84,10 @@ open class SyntaxTextView: _View { open override var tintColor: UIColor! { didSet { - + #if targetEnvironment(macCatalyst) + let textInputTraits = textView.value(forKey: "textInputTraits") as? NSObject + textInputTraits?.setValue(tintColor, forKey: "insertionPointColor") + #endif } }