Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 翻转uiview,就像打开带有动画的卡片一样_Iphone_Objective C_Animation_Flip - Fatal编程技术网

Iphone 翻转uiview,就像打开带有动画的卡片一样

Iphone 翻转uiview,就像打开带有动画的卡片一样,iphone,objective-c,animation,flip,Iphone,Objective C,Animation,Flip,我正在开发一个应用程序,在其中我必须打开一张像这样的视频卡 有人能给我一些建议吗?我可以用什么库或方法在两个UIView之间制作这种类型的动画 [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1.0]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:yourView2 cache:YES];// Here

我正在开发一个应用程序,在其中我必须打开一张像这样的视频卡


有人能给我一些建议吗?我可以用什么库或方法在两个UIView之间制作这种类型的动画

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:yourView2 cache:YES];// Here i set UIView2
[yourView1 removeFromSuperview];// And here i remove UIView1
[UIView commitAnimations];
在这里,您还可以使用
uiviewmanimationtransitioncurldown
而不是
uiviewmanimationtransitioncurldup


也可以看到这个演示

请尝试此演示以获得您的效果

试试看

- (IBAction)viewCommentBtnClk:(id)sender
{
ShowCommentViewController *showCommentVC = [[ShowCommentViewController alloc]init];
showCommentVC.buss_id = business_id;
[UIView beginAnimations:@"animation" context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
[self.navigationController pushViewController:showCommentVC animated:YES];
[UIView commitAnimations];
[self presentModalViewController:showCommentVC animated:YES];
[showCommentVC release];
}

希望我能帮上忙。

他们有很多关于这个问题的帖子


希望您能从中找到解决方案……

在iOS 4.0及更高版本中不鼓励使用此方法。您应该使用基于块的动画方法来指定动画。
@Shivam S.Kara您使用了此代码??尝试演示??不-我只是告诉你不鼓励使用非基于块的api。你好,Samir,我喜欢这个库。。。但是我们可以翻转整个页面而不是翻转一半吗