我需要以2秒的时间间隔在图像视图中显示图像。但是,此代码仅显示最后一张图片如何在循环中显示图像(来自网页)?
NSUInteger i,j;
for (i = 1; i <= kNumImages; i++)
{
NSURL *picUrl=[NSURL URLWithString:[NSString stringWithFormat:@"http://panagtakdo.com/misc/images/%d.jpg",i]];
NSData *picData=[[NSData alloc] initWithContentsOfURL:picUrl];
image1.image = [UIImage imageWithData:picData];
NSLog(@"Image %d Success",i);
[NSThread sleepForTimeInterval:0.2];
}
非常感谢你..... – Manohar 2012-04-19 10:23:09
如果你喜欢这个答案,你应该接受它:http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-工作 – calimarkus 2012-04-19 11:59:01
谢谢............ – Manohar 2012-06-28 06:51:14