/ Published in: iPhone
Scales a UIImage to the given size
Expand |
Embed | Plain Text
- (UIImage *)scale:(UIImage *)image toSize:(CGSize)size { UIGraphicsBeginImageContext(size); [image drawInRect:CGRectMake(0, 0, size.width, size.height)]; UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext (); UIGraphicsEndImageContext(); return scaledImage; }
You need to login to post a comment.
