标签:width rom graphics win || text size with begin
使用UIImage+YYAdd.h的:
- (UIImage *)imageByResizeToSize:(CGSize)size { if (size.width <= 0 || size.height <= 0) return nil; UIGraphicsBeginImageContextWithOptions(size, NO, self.scale); [self drawInRect:CGRectMake(0, 0, size.width, size.height)]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; }
标签:width rom graphics win || text size with begin
原文地址:https://www.cnblogs.com/tufei7/p/9021116.html