您的位置:首页 > 移动开发 > IOS开发

iOS实现地图半翻页效果--老代码备用参考

2015-10-13 20:19 609 查看
// Curl the image up or down

CATransition *animation = [CATransition animation];

[animation setDuration:0.35];

[animation setTimingFunction:UIViewAnimationCurveEaseInOut];

if (!curled){

//animation.type = @"mapCurl";

animation.type = @"pageCurl";

animation.fillMode = kCAFillModeForwards;

animation.endProgress = 0.5;

} else {

//animation.type = @"mapUnCurl";

animation.type = @"pageUnCurl";

animation.fillMode = kCAFillModeBackwards;

animation.startProgress = 0.5;

}

[animation setRemovedOnCompletion:NO];

[self.view exchangeSubviewAtIndex:0 withSubviewAtIndex:1];

[self.view.layer addAnimation:animation forKey :@"pageCurlAnimation"];

// Disable user interaction where necessary

if (!curled) {

} else {

}

curled = !curled;

// Do any additional setup after loading the view, typically from a nib.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: