我正在使用以下代码显示UIImage视图:
NSURL *imageUrl = [[NSURL alloc]initWithString:@"http://..."]; NSData *imageData = [[NSData alloc] initWithContentsOfURL:imageUrl]; UIImage *audioArt =[[UIImage alloc] initWithData:imageData]; UIImageView *artView =[[UIImageView alloc] initWithImage:audioArt]; artView.contentMode = UIViewContentModeScaleAspectFit; artView.autoresizesSubviews = NO; artView.frame = viewRef.bounds; [artView setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight]; [artView setBackgroundColor:[UIColor blackColor]]; [viewRef setBackgroundColor:[UIColor blackColor]]; [viewRef addSubview:artView];
在Objective C中是否有一个事件告诉UIImage何时完成加载或UIImageView何时完成显示图像?
非常感谢.