I have a UITextView which has a UIWebView just below it. The frame of UIWebView is set depending on the UITextView. The frames are dynamic and keep changing in UItextViewDidChange method. Now, when the UIWebView is touched, the keyboard is dismissed. I don't want that to happen. The keyboard should stay. If I turn myWebView.userInteractionEnabled = FALSE, will I still be able to copy text from UIWebView.
I don't know if you still be able to copy text, I think not. But here is how to deal with it.
In your touchesBegan method put this if statement
//Get the touch object from touches set.
if(![NSStringFromClass([[touch view] class]) isEqualToString:@"UIWebView"]){
[theTextField resignFirstResponder];
}
the theTextField is the object responsible for displaying the keyboard.
Hope this helps.