By using something like Introspect , you could do:
struct TextEditorWithFocusRing: View {
@Binding var text: String
var body: some View {
TextEditor(text: $text)
.introspectTextView { textView in
textView.enclosingScrollView?.focusRingType = .exterior
}
}
}
}
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.