I have a UITextView that takes up the entire screen. When the user taps on it and the keyboard is displayed, I want the UITextView to resize so that it only takes up the space not filled by the keyboard. Otherwise, some words will always be underneath the keyboard and thus uneditable. I'm changing the size with this line:
_textView.frame = CGRectMake(_textView.frame.origin.x, _textView.frame.origin.y, _textView.frame.size.width, _textView.frame.size.height - keyboardFrameBeginRect.size.height);
Where keyboardFrameBeginRect is the CGRect for the keyboard's frame. However, when the app is running and I double tap on the keyboard (to copy, cut, delete) it snaps back to its original size. How can I prevent this from happening or change the height so that this will not happen?
Resize the UIView containing the UITextView. Since your UITextView have auto layout, it will resize when the UIView size change.