发布于 2012-07-12 00:48:13
下面这段代码可以做到这一点:XBPageCurl
发布于 2013-01-31 17:15:37
我不认为你需要一个OpenGL ES来卷曲你的mapView,就像在iOS 5中一样,你可以在QuartzCore framework中实现这一点。正如我提到的here,您可以看到我的代码,我还修改了该代码,并尝试如下所示
- (void)mapCurl {
[UIView animateWithDuration:1.0
animations:^{
CATransition *animation = [CATransition animation];
[animation setDuration:0.7];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:@"default"]];
animation.fillMode = kCAFillModeForwards;
[animation setRemovedOnCompletion:NO];
// For curl and uncurl the animation here..
if (!_isCurled) {
animation.endProgress = 0.65;
animation.type = @"pageCurl";
[_locationMapView.layer addAnimation:animation forKey:@"pageCurlAnimation"];
// _backView is a view behind the mapView
[_locationMapView addSubview:_backView];
}else {
animation.startProgress = 0.35;
animation.type = @"pageUnCurl";
[_locationMapView.layer addAnimation:animation forKey:@"pageUnCurlAnimation"];
// _backView is a view behind the mapView
[_backView removeFromSuperview];
}
}
];
_isCurled = (!_isCurled);
}https://stackoverflow.com/questions/11260443
复制相似问题