iOS 修改系统cell的imageView的大小

it2022-05-05  124

CGSize itemSize = CGSizeMake(36, 36); UIGraphicsBeginImageContextWithOptions(itemSize, NO,0.0); CGRect imageRect = CGRectMake(0.0, 0.0, itemSize.width, itemSize.height); [cell.imageView.image drawInRect:imageRect]; cell.imageView.contentMode=UIViewContentModeScaleAspectFit; cell.imageView.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();

最新回复(0)