iOS: 动画更换 UIImageView 的 Image
#import <QuartzCore/QuartzCore.h> ... imageView.image = [UIImage imageNamed:(i % 2) ? @"3.jpg" : @"4.jpg"]; CATransition *transition = [CATransition animation]; transition.duration = 1.0f; transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; transition.type = kCATransitionFade; [imageView.layer addAnimation:transition forKey:nil];