how to reduce imagesize in iphone
Iam new to iphone currently my problem is
i displayed 6 images in i开发者_高级运维mage view It was not showing images in imageview I think the imageviews are in large size
so plz send me code for this imageview.
Thank u in advance.
You could use this for image resizing:
- (UIImage *)rescaleImageToSize:(CGSize)size {
CGRect rect = CGRectMake(0.0, 0.0, size.width, size.height);
UIGraphicsBeginImageContext(rect.size);
[self drawInRect:rect]; // scales image to rect
UIImage *resImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return resImage;
}
精彩评论