How to dismiss an UITextView with tapping outside?
<p>I've got a bit of a doubt with <code>UITextView</code>s. I use to put <code>UITextField</code>s, and remove the keyboard by tapping outside with the faithful old:</p>

<pre><code>-(void)touchesEnded: (NSSet *)touches withEvent: (UIEvent *)event {
for (UIView* view in self.view.subviews) {
    if ([view isKindOfClass:[UITextField class]])
        [view resignFirstResponder];
}
}
</code></pre>

<p>I have this UITextView which is set on my view (and actually is <code>self.myTV</code>, to be precise), and I do the following</p>

<pre><code>-(void)touchesEnded: (NSSet *)touches withEvent: (UIEvent *)event {
for (UIView* view in self.view.subviews) {
    if ([view isKindOfClass:[UITextView class]])
        [view resignFirstResponder];
}
}
</code></pre>

<p>Same as above, save for the different class...</p>

<p>Well it doesn't seem to work. Anyone has a suggestion?</p>
