2
현재 페이스 북에서 사용자 벽 피드를로드하는 UITableview로 작업하고 있습니다. 내가 가진 문제는 테이블 뷰에 넣을 이미지가 잘로드되지만 사용자가 스크롤하면 이미지가 완전히 검게 변합니다.Uitableview 사진 위로보기 검은 색으로 변합니다.
현재 페이스 북에서 사용자 벽 피드를로드하는 UITableview로 작업하고 있습니다. 내가 가진 문제는 테이블 뷰에 넣을 이미지가 잘로드되지만 사용자가 스크롤하면 이미지가 완전히 검게 변합니다.Uitableview 사진 위로보기 검은 색으로 변합니다.
이 링크는 당신이 당신의 문제를 해결하는 데 도움이 될 수 있습니다 참조 어떤 도움 :)에 대한
if ([[objectTypes objectAtIndex:indexPath.row] isEqualToString:@"photo"]) {
//this is a picture
if ([facebookPictureObjectIDs objectAtIndex:indexPath.row])
{
if ([sourceArray objectAtIndex:indexPath.row]) {
if ([[sourceArray objectAtIndex:indexPath.row] rangeOfString:[facebookPictureObjectIDs objectAtIndex:indexPath.row]].location != NSNotFound) {
imageCell.imageview.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[sourceArray objectAtIndex:indexPath.row]]]];
NSLog(@"source array objectwith image ID: %@",[facebookPictureObjectIDs objectAtIndex:indexPath.row]);
}else {
NSLog(@"Same Image object id is: %@", [facebookPictureObjectIDs objectAtIndex:indexPath.row]);
}
} else {
NSLog(@"Source Array object NIL NIL NIL");
}
}else {
NSLog(@"Else Called");
}
[imageCell layoutSubviews];
returnCell = imageCell;
}
감사 : 여기 내 cellForRow 방법이다. http://developer.apple.com/library/ios/#samplecode/LazyTableImages/Introduction/Intro.html