title: Handling UIResponder for UITextView in SwiftUI
body: <p>I am trying to handle <code>UIResponder</code> for an existing subclass of <code>UITextView</code> in SwiftUI. I have been able to use the Coordinator pattern to handle <code>UITextViewDelegate</code> but I'm having trouble with <code>UIResponder</code>.</p>
  
  <p>In the past (with UIKit), what I would have done is use <code>NotificationCenter</code> to add an observer for <code>UIResponder.keyboardWillShowNotification</code> in a subclass of <code>UIViewController</code>.</p>
  
  <p>In SwiftUI, I'm not sure where to put it. I've done a simple thing which is to re-use the Coordinator class in <code>makeUIView</code>, as in:</p>
  
  <pre><code>    let nc = NotificationCenter.default
      nc.addObserver(context.coordinator, selector: #selector(Coordinator.keyboardWillShow(notification:)), name: UIResponder.keyboardWillShowNotification, object: editorTextView)
  </code></pre>
  
  <p>But the <code>keyboardWillShow</code> method never gets called. Am I doing this wrong?</p>