//动画效果 // 从上往下 CATransition *animation = [CATransitionanimation]; //animation.delegate = self; animation.duration = 0.4f; animation.timingFunction = UIViewAnimationCurveEaseInOut; animation.fillMode = kCAFillModeForwards; animation.type = kCATransitionMoveIn; animation.subtype = kCATransitionFromTop; [self.car.layeraddAnimation:animation forKey:@"animation"];
动画 从下往上、从上往下//从下往上 CATransition *animation = [CATransitionanimation]; animation.duration = 0.4f; animation.timingFunction = UIViewAnimationCurveEaseInOut; animation.fillMode = kCAFillModeForwards; animation.type = kCATransitionPush; animation.subtype = kCATransitionFromBottom; [self.car.layeraddAnimation:animation forKey:@"animation"];