This is not weird at all :)
You can do this by registering as an observer to the UIKeyboardWillShowNotification
(it would be a good idea to also register for the UIKeyboardWillHideNotification
in the same process).
When the registered selector will be called, the notification parameter will contain the keyboard's size inside the UIKeyboardFrameEndUserInfoKey
value of the userInfo
dictionnary :
[[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size
All you need to do now is to set the frame of your UITextView to your desired size.
Be warned : the CGRect you get does not take into account the device orientation. This means, if the device is in fact in landscape mode, you'll need to switch the width and height of the CGRect for it to make sense in your context.