首页 > 移动平台 > 详细

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

时间:2015-10-13 21:14:49      阅读:326      评论:0      收藏:0      [点我收藏+]

// 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.

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

原文:http://www.cnblogs.com/isItOk/p/4875718.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!