A part of my application is showing a list in UIcollectionView, if the user swipe down the screen I will present the UISearchBar with animation from the top of the viewController. I did all of them in a separate viewController.
I use autolayout to position the controls in that viewController.
I move the search bar form y=-88 to y=0 and move the collectionView down to make space for searchBar with animation when the user swipe down the screen, my problem is that if I make call to reloadData to collectionView, both search bar and CollectionView move to their previous autolayouted positions
I use below animation to move them
[UIView animateWithDuration:0.4 animations:^(void){
fileSearchBar.frame=fileSearchBar.frame=CGRectOffset(fileSearchBar.frame, 0,88);
chartsCollectionView.frame=gridFrame;///gridFrame is calculated to move down
}];
I there a way to stop them moving to their pre-calculated position