模态视图控制器
我在 Xcode 中使用以下代码在 iPhone 应用程序中的 2 个视图之间水平翻转
-(IBAction)switchView:(id)sender{
Algorithm2ViewController *Algorithm2ViewControllergo = [[Algorithm2ViewController alloc]
initWithNibName:@"Algorithm2ViewController" bundle:nil];
[UIView beginAnimations:@"flipview" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
forView:self.view cache:NO];
[self.view addSubview:Algorithm2ViewControllergo.view];
[UIView commitAnimations];
}
,第一次翻转后我在翻转完成之前在后台获得了即将出现的视图的图像,我该如何摆脱它?
I am using the following code in Xcode to horizontally flip between 2 views in an iPhone app
-(IBAction)switchView:(id)sender{
Algorithm2ViewController *Algorithm2ViewControllergo = [[Algorithm2ViewController alloc]
initWithNibName:@"Algorithm2ViewController" bundle:nil];
[UIView beginAnimations:@"flipview" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
forView:self.view cache:NO];
[self.view addSubview:Algorithm2ViewControllergo.view];
[UIView commitAnimations];
}
after the first flip I get an image of the coming view in the background before the completion of the flip how do I get rid of it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经在第二个视图中找到了这一点,添加以下代码
从超级视图行中删除将删除背景图像
I have figured this out in the second view add the following code
The remove from superview line will remove the background image