to make my problem understandable, here an excerpt from my code:
[UIView animateWithDuration:0.5 animations:^{
taskTable.frame = CGRectMake(
taskTable.frame.origin.x,
taskTable.frame.origin.y,
taskTable.frame.size.width,
127
);
} completion:^(BOOL finished) {
[self.taskTable reloadData];
}];
This is the basic situation: taskTable is a UITableView and it is integrated in a UIViewController. The first block works properly, the taskTable is after 0.5 seconds less on the height.
My problem starts in the completion block: after the taskTable is reloaded, the taskTable is again equal to the original height. The original height is set in the storyboard by the way.
Can someone tell me the reason for that? Can I prevent this behavior?
Here is a snapshot of the storyboard:

To give the question an answer:
you can disable autolayout to solve the problem, but that’s not the nicest way.
How I solve the problem: I definied a constraint between the top of the superview and the tableView. After that I add the follwing in code (taskTableTop is that constraint):
I don’t know if there is a easier way to do this.
If someone has a better answer ready, feel free to tell me (us) ;o)