I have a UITextView and am trying to animate a frame change when the user clicks a button. Basically, the text view becomes larger to fit the screen so that it can display more text, and then when the user clicks the button again, it shrinks to the original frame.
I am doing animation using blocks, for example:
if(!isDisplayingDetailView) { //Expand view [UIView animateWithDuration:0.5 animations:^{ self.detailView.frame = self.view.frame; } completion:^(BOOL finished){ isDisplayingDetailView = YES; }]; } else{ //Shrink view. [UIView animateWithDuration:0.5 animations:^{ self.detailView.frame = self.detailFrame; } completion:^(BOOL finished){ isDisplayingDetailView = NO; }]; }
Where self.detailView is a UITextView and self.detailFrame is just a CGRect containing the original frame. isDisplayingDetailView is just a BOOL to check if the view is expanding. My problem is that resizing text doesnβt make things live. I took some screenshots from a test application to illustrate my problem: Default appearance of the application: 
Extended view:

Text image an instant after pressing a button:

As you can see, the text is automatically compressed to the final frame size without any animation, while the borders are still animated. I assume that the correct behavior, but I would like to know whether it is possible to animate the text along with its presentation.
source share