self.view添加UIView时添加动画

    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"];
上一篇:Python操作MySQL数据库(步骤教程)


下一篇:Project Euler 75:Singular integer right triangles