Post

Replies

Boosts

Views

Activity

SwiftUI TextEditor performance issues
Has anyone used the new SwiftUI 2.0 TextEditor with a sizeable string? I'm currently trying it with a 400K text string and typing into the TextEditor horribly slow. Each letter I type takes seconds to appear. When the text size is small (say just a few thousand characters) it's fast - so it's clearly something to do with performance. Is this a known issue? Should I be doing something to improve it? PS - I do need to use it for my app (for e.g., a Markdown editor that loads a large file)  if let t = try? String(contentsOfFile: filePathName, encoding: .utf8) {             editorText = t             Config.logger.debug("EditorView.onAppear: Read text count = \(t.count) characters")             }
4
0
3.1k
Dec ’22
SwiftUI app broken when upgraded to macOS Big Sur 11.3
I have a SwiftUI app that works perfectly fine on the version prior to the new 11.3 update. The app has a List and on clicking an entry, opens the child view which has a toolbar. This app has been working fine for months now, and once I upgraded to 11.3, the following happens the app opens fine it even loads the entries into the list view when I click on the entry, the right side is "empty" - no toolbar, no content. But the View is loading! (because the debug statements from the view onAppear are executing) I have absolutely no idea where to even look. Has something materially changed in SwiftUI or Xcode that would break an app like this? There are no error messages, warnings etc. - nothing. The child area just stays empty... that's it. I have a MacBook Pro which I haven't upgraded to 11.3, and the app works just fine there. I've recompiled with the latest Xcode etc., no use. Looking for any hints, thank you,
0
0
733
May ’21