码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2015-10-13 21:15:25      阅读:208      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!