I am trying to display this text inside TextEditor in full screen but it is showingup inside this scrolling frame.
I've tried this method .fixedSize(horizontal: false, vertical: true) on TextEditor View but it didn't help.
I’ve shared this preview:
import SwiftUI
struct TempView: View {
@State private var sampleText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."
var body: some View {
ScrollView() {
VStack() {
TextEditor(text: $sampleText)
.font(.largeTitle)
.background(Color.blue)
}
.background(Color.blue)
}
}
}

Edit: I included one more solution in this answer. Code is below the image.
However, if you want to display just your TextEditor in full screen, you don't need the ScrollView because TextEditor has its own supported scroll already.