I'm creating a document-based application for macOS using SwiftUI.
Is there a built-in styling method for showing a TextEditor's line numbers?
struct ContentView: View {
@Binding var document: AppDocument
var body: some View {
TextEditor(text: $document.text) // I removed a few irrelevant options.
.disableAutocorrection(true)
.font(.system(size: 12, design: .monospaced))
}
}
