Replies: 1 comment
-
func updateNSView(_ scrollView: NSScrollView, context: Context) {
…
textView.attributedText = NSAttributedString(styledAttributedString(textView.typingAttributes))
…
} this assignment is a cuplprit, as it reset the content, and relayout everything. There's no good SwiftUI API for making incremental updates from the State variable. If you come up with somethng that is easy to use from SwiftUI, I'm all ears. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Have you had any luck getting this to work with sizeThatFits with NSViewRepresentable? I've been trying for a few days now and have been going in circles. The main issue is I am getting a lot of flickering whenever adding a new line.
Current iteration:
Beta Was this translation helpful? Give feedback.
All reactions