标签:os io size c ios ui text ef
这方法挺实用的,直接调用就可以得到想要的size。
//将一个UIImage缩放变换到指定Size
-(UIImage*) OriginImage:(UIImage *)image scaleToSize:(CGSize)size
{
UIGraphicsBeginImageContext(size);
[image drawInRect:CGRectMake(0, 0, size.width, size.height)];
UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return scaledImage;
}
iOS 将一个UIImage缩放到指定Size,布布扣,bubuko.com
标签:os io size c ios ui text ef
原文地址:http://www.cnblogs.com/Ewenblog/p/3891800.html