我有两个视图控制器,称它们为“ViewControllerA”和“ViewControllerB”。当应用程序加载时,会显示 ViewControllerA。在 ViewControllerA 中touchesEnded:withEvent:
,它调用presentViewController:
ViewControllerB。ViewControllerB 的加载工作正常;唯一的问题是当它们转换时, ViewControllerA 变黑。即使在转换到 ViewControllerB 时,如何让 ViewControllerA 继续查看其内容?如果它是相关的,我使用自定义转换,这里演示:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.7f];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationRepeatCount:1.0f];
[UIView setAnimationRepeatAutoreverses:NO];
[UIView setAnimationDelegate:self];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
toViewController.view.frame = self.view.bounds;
[self presentViewController:toViewController animated:NO completion:nil];
[UIView commitAnimations];