码迷,mamicode.com
首页 > 其他好文 > 详细

self.view添加UIView时添加动画

时间:2014-08-04 13:25:57      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   for   cti   ar   div   

    CATransition *animation = [CATransition animation];
    animation.delegate = self;
    animation.duration = 0.5f;
    animation.timingFunction = UIViewAnimationCurveEaseInOut;
    
    if ([subView isKindOfClass:[AreaNumPickerView class]]) {
        animation.subtype = kCATransitionFromBottom;
    }else{
        animation.type    = kCATransitionPush;     //平移
        animation.subtype = kCATransitionFromRight;//从右到左
    }
    
    [superView addSubview:subView];
    [[superView layer] addAnimation:animation forKey:@"animation"];

 

self.view添加UIView时添加动画,布布扣,bubuko.com

self.view添加UIView时添加动画

标签:style   blog   color   io   for   cti   ar   div   

原文地址:http://www.cnblogs.com/hw140430/p/3889651.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!