优化tableview

2016-11-18  本文已影响18人  路这么长
 -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{

    }
//设置 cell进行异步加载
cell.layer. drawsAsynchronously = YES;
//设置 cell完全不透明 减少渲染时间
Cell.opaque = YES;
//异步处理图片 
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// 在线程中所做的处理 
                ...

            [Cell.imageViewActivity sd_setImageWithURL:[NSURL URLWithString:model.thumb] placeholderImage:[UIImage imageNamed:@"imageDefault"]];
 
        });
上一篇 下一篇

猜你喜欢

热点阅读