I have method to animate simultaneously search bar and table view (viewFilterResults
is just one of the views):
CGFloat heightSearchBar = CGRectGetHeight(_searchBar.frame);
[UIView animateWithDuration:animationDuration delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
CGRect frameSearch = _searchBar.frame;
frameSearch.origin.y = CGRectGetMaxY(self.viewFilterResults.frame);
_searchBar.frame = frameSearch;
CGRect frameTable = _plantsListTableView.frame;
frameTable.origin.y = CGRectGetMaxY(self.viewFilterResults.frame) + heightSearchBar;
frameTable.size.height = CGRectGetHeight(self.view.frame) - CGRectGetMinY(frameTable);
_plantsListTableView.frame = frameTable;
} completion:^(BOOL finished) {
if (completionBlock) {
completionBlock();
}
}];
on iOS 6 and 5 everything is OK, but on iOS 7 search bar animation is OK, but table view moves to proper place without animation. May be it's impossible to animate table view on iOS 7 ?
update:
I've tried to animate content insets of table view, but the result is the same. So that didn't help.