This is in fact quite easy to achieve using simple UIView
animations:
[UIView transitionWithView:viewToAnimate
duration:0.3
options:UIViewAnimationOptionTransitionFlipFromLeft
animations:^{
// TODO: Animations here
viewToHide.hidden = YES;
viewToShow.hidden = NO;
}
As you may note, the key here for the flip is the option UIViewAnimationOptionTransitionFlipFromLeft
. Use it along with UIViewAnimationOptionTransitionFlipFromRight
to obtain the same result that you are seeing in the GIF.
Only the viewToAnimate
and its contents will flip, everything outside its hierarchy will stay still.