cell imageView in UITableView doesn't appear until selected

前端 未结 8 1928
慢半拍i
慢半拍i 2020-12-24 01:44
  1. Here is a video of the problem: http://youtu.be/Jid0PO2HgcU

  2. I have a problem when trying to set the image for the [cell imageView] in a UITableView

8条回答
  •  独厮守ぢ
    2020-12-24 02:40

    This is my way how i solved these problem, i know is not the best but that work :)

        UIImage *thumbnailImage = ...
    
        dispatch_async(dispatch_get_main_queue(), ^{
            [cell.imageView setImage:thumbnailImage];
    
            UITableViewCellSelectionStyle selectionStyle = cell.selectionStyle;
            cell.selectionStyle = UITableViewCellSelectionStyleNone;
            [cell setSelected:YES];
            [cell setSelected:NO];
            cell.selectionStyle = selectionStyle;
        });
    

提交回复
热议问题