I am dealing with a problem with a TextEditor
element in my SwiftUI view. At any time when I copy-paste content material into the TextEditor, it begins to flicker whereas typing, and parts of the textual content content material develop into hidden. It seems that there could be an issue with accurately figuring out the content material measurement. Has anybody else encountered an identical challenge or discovered a workaround for it? Any insights or recommendations can be enormously appreciated.
This is a simplified model of my code:
struct ContentView: View {
@State var notes = ""
var physique: some View {
VStack {
TextEditor(textual content: $notes)
.foregroundStyle(Shade.black)
.body(top: 142)
.overlay(
RoundedRectangle(cornerRadius: 8)
.stroke(Shade.grey, lineWidth: 1)
)
Spacer()
}
.padding()
}
}