我想实现一个自动更改图片库。这是我在控制器中的代码。我有一个名为 image 的 uiimageview。我想将图像数组链接到我的图像视图,让它在几秒钟后自动更改。我该怎么办??
- (void)viewDidLoad{
[super viewDidLoad];
[self performSelector:@selector(changeImage) withObject:nil afterDelay:2];
}
-(void)changeImage {
NSArray *images = [NSArray arrayWithObjects:[UIImage imageNamed:@"animated-fish-1.jpg"], [UIImage imageNamed:@"tumblr_7"], [UIImage imageNamed:@"th_nature_4.jpg"],nil];
image.animationImages = images;
// how to let the array of image load and link to the perform selector??
// what should i continue from here?
}