UITableViewCell 自带imageView 的属性设置

CGSize itemSize = CGSizeMake(kSuitLength_V(49), kSuitLength_V(49));

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();

cell.imageView.layer.cornerRadius = kSuitLength_H(49) / 2.0;

cell.imageView.layer.masksToBounds = YES;

cell.imageView.backgroundColor = kClearColor;

你可能感兴趣的:(UITableViewCell 自带imageView 的属性设置)