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,但同樣的問題,請一些建議!謝謝:)