如何使用翻转动画显示MapView选项?

时间:2012-05-11 00:50:11

标签: iphone objective-c ios mkmapview

如何使用底部动画中的翻转在mapView中显示选项?就像iPhone中的原始地图应用程序一样?像这样:

Like This

谢谢!

2 个答案:

答案 0 :(得分:4)

将基础视图显示为模态控制器并使用过渡样式 - 部分卷曲。像这样:

controller.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:controller animated:YES];

<强>更新 在iOS6中你应该这样做:

SecondeViewController *nextView = [[SecondeViewController alloc] init];
nextView.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentViewController:nextView animated:YES completion:Nil];

答案 1 :(得分:0)

UIViewAnimationTransition transition = UIViewAnimationTransitionCurlUp;
UIViewAnimationCurve curve = UIViewAnimationCurveEaseInOut;
[UIView beginAnimations:@"anim" context:NULL];
[UIView setAnimationCurve:curve];
[UIView setAnimationTransition:transition forView:[self view] cache:YES];
[UIView setAnimationDuration:1.0f];
[UIView commitAnimations];