blog icon indicating copy to clipboard operation
blog copied to clipboard

How to clear TextEditor background in SwiftUI

Open onmyway133 opened this issue 1 year ago • 0 comments

For iOS 16 and macOS 13.0

TextEditor(text: $text)
    .scrollContentBackground(.hidden)

For below, use [SwiftUI-Introspect](https://github.com/siteline/SwiftUI-Introspect)

TextEditor(text: $text)
    .instrospectTextView {
        $0.drawsBackground = false
    }

onmyway133 avatar Jun 19 '23 12:06 onmyway133