-1
피드가 두 개 있고 테이블보기를 채우기 위해 내용이 필요하지만 이미지를 표시 할 때 키가 다른 점은 cellForRowAtIndexPath입니다.키에 값이 없는지 확인하는 방법
if ([[stories objectAtIndex:storyIndex] objectForKey:@"url"] ==nil) {
[cell.imag setImageWithURL:[NSURL URLWithString:[[stories objectAtIndex:storyIndex] objectForKey:@"_text"]] placeholderImage:[UIImage imageNamed:@"Alb.png"]];
}
else
[cell.imag setImageWithURL:[NSURL URLWithString:[[stories objectAtIndex:storyIndex] objectForKey:@"url"]] placeholderImage:[UIImage imageNamed:@"Alb.png"]];
하지만 작동하지 않습니다.
사용 ([사전 objectForKey : 키])가있는 경우이 코드 콘솔의 값을 인쇄 할 –
풋 브레이크 포인트 { //이 객체를 포함} [이야기 objectAtIndex : storyIndex] objectForKey : @ "url"] 어떤 가치가 인쇄됩니까 .... – Spynet