title: UITextInput protocol usage for UITextField and UITextView to manage selection results in crash
body: <p>UITextField and UITextView both adopt the UITextInput protocol. UITextView's selectedRange property returns NSRange, where UITextField doesn't have any selection properties/methods. I'd like to use one routine to manage insertion in either UITextField or UITextView.</p>
  
  <p>So I do the following:</p>
  
  <pre><code>    id&lt;UITextInput&gt; textInput = nil;
  
      if ([self.aTextView isFirstResponder]) {
          textInput = self.aTextView;
      } else if ([self.aTextField isFirstResponder]) {
          textInput = self.aTextField;
      }
  
      if (textInput != nil) {
          UITextRange * selectedRange = textInput.selectedTextRange;
          // ...
      }
  </code></pre>
  
  <p>Only to promptly crash with 'unrecognized selector sent to instance' on the selectedTextRange property.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>[EDIT: seems to work in iOS 5, but crashes on device in iOS 4. Is this a change in iOS 5? The docs say the protocol is 3.2+.]</p>