0
我从未有过使用AFNetworking的应用程序的问题,因为我有20像素显示,但现在我的应用程序崩溃,因为我想将imagewithURL设置为150 Imageviews,如果我评论该线路一切正常,这是我的代码:AFNetworking +许多imageviews =崩溃 - >收到内存警告
for (int i=0; i< Array.count; i++) {
UIImageView *imgProd=[[UIImageView alloc] initWithFrame:CGRectMake(margenX, margenY, 220, 330)];
imgProd.contentMode = UIViewContentModeScaleAspectFill;
imgProd.clipsToBounds = YES;
[imgProd setTag:i];
// dispatch_async(dispatch_get_main_queue(), ^{
[imgProd setImageWithURL:[NSURL URLWithString: [Array objectAtIndex:i]]];
// });
imgProd.userInteractionEnabled = YES;
UITapGestureRecognizer *tap ... etc etc.
}
我把dispatch_async,但同样的问题,请一些建议!谢谢:)