UIImage
未显示图像。我创建了一个UIImageView
自定义类使用表格单元格:UIImageView无法显示图像
imgView = [[UIImageView alloc]init];
frame= CGRectMake(boundsX+10 ,0, 50, 44);
imgView.frame = frame;
然后,我试图加载每个单元并没有什么。但是,我能够在日志消息中读取图像URL。
NSURL *url = [NSURL URLWithString: [dict objectForKey:@"imageAdd"]];
NSData *data = [NSData dataWithContentsOfURL: url];
UIImage * image = [[UIImage alloc] initWithData:[[data copy] autorelease]];
NSLog (@"The image is located at the URL: %@", url);
cell.imgView.image = image;
return cell;
如果注销imgView(的NSLog(@“图片:%@”,imgView);)它有什么样的信息?什么是确切的框架(主要是X值,因为它是唯一的变量int)。 – Brayden