제가
이
- (void)loadImagesForVisibleCells;
{ 있는 NSArray를 사용하여 고정하는 관리 확인 셀 = self.newsStories visibleCells]; [셀 유지]; for (int i = 0; i < [셀 수]; i ++) { // 배열의 각 셀로 이동하고 해당 셀에 응답하는 경우 해당 loadContent 메서드를 호출합니다. CGRect 프레임; frame.size.width = 75; frame.size.height = 75; frame.origin.x = 0; frame.origin.y = 0; AsyncImageView asyncImage = [[[AsyncImageView alloc] initWithFrame : frame] autorelease]; 방법 :
//AsyncImageView *asyncImage = (AsyncImageView *)[[cells objectAtIndex: i] retain];
//*flickrCell = (FlickrCell *)[[cells objectAtIndex: i] retain];
NewcastleStories *aStory = [stories objectAtIndex:i];
//AsyncImageView* asyncImage = [[AsyncImageView alloc]init];
[asyncImage emptyImages];
NSURL* url =[NSURL URLWithString:aStory.picture];
[asyncImage loadImageFromURL:url];
//[cells objectAtIndex:i])
static NSString *CellIdentifier = @"ImageCell";
UITableViewCell *cell = [newsStories dequeueReusableCellWithIdentifier:CellIdentifier];
[cell.contentView addSubview:asyncImage];
[[self newsStories]setNeedsLayout];
[[self newsStories] setNeedsDisplay];
//[self dataLoaded];
//[asyncImage loadImage];
//[flickrCell release];
//flickrCell = nil;
}
[cells release];
}
있지만이는
[self performSelectorOnMainThread:@selector(loadImagesForVisibleCells) withObject:nil waitUntilDone:YES];
이 cellForRowAtIndexPath에서 관련 코드를 게시하시기 바랍니다 사용하여 메인 스레드에서 호출합니다. – warrenm