首页 > 其他 > 详细

下拉弹窗 pop push动画实现

时间:2015-04-03 13:22:47      阅读:114      评论:0      收藏:0      [点我收藏+]

- (void)popTitleView:(UIButton *)btn

{

    if (popView.superview ==self.view) {

        CATransition *animation =[CATransition animation];

        animation.delegate=self;

        animation.duration=0.3;

        animation.timingFunction=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];

        animation.type=kCATransitionPush;

        animation.subtype=kCATransitionFromTop;

        [popView setAlpha:0.0f];

        [popView.layer addAnimation:animation forKey:@"TSLocateView"];

        [popView performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.3];

    }else{

        CATransition *animation =[CATransition animation];

        animation.delegate=self;

        animation.duration=0.3;

        animation.timingFunction=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];

        animation.type=kCATransitionPush;

        animation.subtype=kCATransitionFromBottom;

        [popView setAlpha:1.0f];

        [popView.layer addAnimation:animation forKey:@"pushIn"];

        [self.view addSubview:popView];

    }

}

下拉弹窗 pop push动画实现

原文:http://www.cnblogs.com/baohong-v/p/4389600.html

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