简体   繁体   中英

texteditor scroll hidden in swiftUI

I want to hidden scroll indicator in textEditor. Support from swiftui modifier, uikit possible ways in?

TextEditor(text: $context)
                        .foregroundColor(self.context == contextPlaceholder ? Color.grayA7 : Color.gray23)
                        .font(.bodyRegular)
                        .focused($isTextFieldsFocused)
                        .background(Color.grayF5)
                        .lineSpacing()
                        .padding(.vertical, 23)
                        .padding(.horizontal, 20)
                        .textSelection(.disabled)
                        .onTapGesture {
                            if self.context == contextPlaceholder{
                                self.context = ""
                            }
                        }

Using Introspect :

TextEditor(text: $context)
    .introspectTextView { textView in
        textView.showsVerticalScrollIndicator = false
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM