我正在使用菜单,我需要创建适合“单元格”的图像。每当我缩放我的图像时,它看起来很糟糕!
代码:
CGSize newSize = CGSizeMake(22, 22); //whaterver size
UIGraphicsBeginImageContext(newSize);
[cimg drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();