设置UITableViewCell系统单元格图片大小

        //1、首先对image付值

        cell.imageView.image = image;

        //2、调整大小

        CGSize itemSize = CGSizeMake(56,56);

        UIGraphicsBeginImageContextWithOptions(itemSize,NO, UIScreen.mainScreen.scale);

        CGRect imageRect = CGRectMake(0.0,0.0, itemSize.width, itemSize.height);

        [cell.imageView.image drawInRect:imageRect];

        cell.imageView.image = UIGraphicsGetImageFromCurrentImageContext();

        UIGraphicsEndImageContext();

你可能感兴趣的:(设置UITableViewCell系统单元格图片大小)