我正在关闭一个模态视图控制器,然后立即呈现另一个模态视图控制器,但是我目前只能在第二个模态视图上使用动画,而不能在两个模态视图上同时使用。
有没有办法延迟过程,以便用户体验到两个动画?
以下代码当前有效,但用户显然只看到第二个动画:
// First one configure
detailViewController.modalPresentationStyle = UIModalPresentationFullScreen;
detailViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:detailViewController animated:YES];
//Dismiss first one
[self dismissModalViewControllerAnimated:NO];
//Immediately configure and show second one
navController.modalPresentationStyle = UIModalPresentationFormSheet;
navController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:navController animated:YES];
[self dismissModalViewControllerAnimated:YES];
但没有成功吗? - Michael Dautermann