Flip animation when controller pushed on iPhone

前端 未结 4 837
失恋的感觉
失恋的感觉 2020-12-23 23:36

I had a look around and didn\'t find what I was exactly looking for.

Is there a way to get a flip animation when pushing a view controller?

I read that you c

4条回答
  •  不思量自难忘°
    2020-12-24 00:16

    something like this should work

    [UIView beginAnimations:@"animation" context:nil];
    [self.navigationController pushViewController: yourviewcontroller animated:NO]; 
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO]; 
    [UIView commitAnimations];
    

    don't forget to set animated to NO when calling pushViewController

提交回复
热议问题