// // ContentView.swift // CatalystEmojiTest // // Created by Shadowfacts on 4/3/23. // import SwiftUI struct ContentView: View { @State private var text = "" var body: some View { NavigationStack { TextEditor(text: $text) .toolbar { // try commenting this ToolbarItem out: ToolbarItem(placement: .confirmationAction) { Button("OK") {} } } } } } struct TestWrappedTextView: UIViewRepresentable { @Binding var text: String func makeUIView(context: Context) -> UITextView { let v = UITextView() v.delegate = context.coordinator return v } func updateUIView(_ uiView: UITextView, context: Context) { } func makeCoordinator() -> Coordinator { Coordinator(binding: $text) } class Coordinator: NSObject, UITextViewDelegate { let binding: Binding init(binding: Binding) { self.binding = binding } func textViewDidChange(_ textView: UITextView) { binding.wrappedValue = textView.text } } }