imgBiteSpot.clipsToBounds=YES;
NSData *imageData = [[[NSData alloc]init]autorelease];
imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:ObjBitSpot.StrImagePath]];
if(imageData==0)
{
imgBiteSpot.image=[UIImage imageNamed:@"img-not-found.gif"];
}
else {
UIImage *imgs = [[UIImage alloc] initWithData:imageData];
UIGraphicsBeginImageContext(CGSizeMake(88,88));
[imgs drawInRect:CGRectMake(0.0, 0.0, 88.0, 88.0)];
UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
imgBiteSpot.image=newImage;
[imgs release];
}
iPhone中的图像加载问题? - 来自webservice
我已经将图像载入
imgBiteSpot
。 图像从web服务加载。问题是它需要太多时间(35秒到1分钟)。
如果我删除图像 - >代码/加载,反应时间仅为0.2秒。
减少图像加载过程的时间的解决方案是什么?
在此先感谢您的帮助。