페이 스북처럼 피드 페이지를 만들려고하고 있습니다. 게으른로드를 사용하여 tableview 셀에 이미지를로드하고 있습니다. 때로는 임의의 셀에서 스크롤 잠금이 발생하지만 위 또는 아래의 다른 보이는 셀을 스크롤하려고하면 스크롤됩니다. 이 문제는 매우 드문 경우입니다. 이 문제의 원인을 바로 잡을 수는 없습니다. 도와주세요.TableView 셀 중지 셀 스크롤
다음은 코드입니다. 뭔가 메인 스레드 (UI를 업데이트 할 책임이 스레드를) 차단과 같은
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
//label to show values of the menu
static NSString *CellIdentifier = @"CellIdentifier";
// Dequeue or create a cell of the appropriate type.
socialFeedCustomCell *cell = (socialFeedCustomCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[socialFeedCustomCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] ;
cell.accessoryType = UITableViewCellAccessoryNone;
}
for (UIView *tempView in cell.contentView.subviews) {
[tempView removeFromSuperview];
}
[self renderInstagramData:indexPath cell:cell];
cell.contentView.layer.opaque=YES;
cell.layer.shouldRasterize = YES;
cell.layer.rasterizationScale = [UIScreen mainScreen].scale;
cell.selectionStyle=UITableViewCellSelectionStyleNone;
cell.backgroundColor=[UIColor clearColor];
cell.userInteractionEnabled=YES;
return cell;
}
감사
더 나은 이해를 위해 코드와 스크린 샷을 표시하십시오. –
스크린 샷을 사용하여 스크롤 잠금을 표시 할 수 없습니다. 테이블 뷰에서 스크롤하고 멈추는 상황을 고려할 수 있습니다. – Superdev
코드에 대해서는 사용자 지정 셀을 사용하고 subviews를 tableview의 contentview에 추가하고 있습니다. – Superdev