views:

1750

answers:

2

Hi,

I am developing an iPhone app where downloading a high quality image from my app server. I am required to resize it to half its size and display it in the table cell. Could anyone help me to find which functions I could use?

Appreciate your suggestions!

+2  A: 
UIImage *yourImage = [UIImage imageWithData:yourdata];
UIImageView *imageViewToPutInCell = [[UIImageView alloc] initWithImage:yourImage];
UIImageView.frame = CGRectMake(0, 0, yourImage.size.width / 2, yourImage.size.height / 2);
Brad Smith
It resized it correctly..thanks!
Iya
A: 

my code is in which i want to display images in cell of same width and size.my image are comming from rss fedd.

int blogEntryIndex1 = [indexPath indexAtPosition: [indexPath length] -1];

imgstring=[[blogEntries objectAtIndex: blogEntryIndex1] objectForKey: @"image"];
NSURL *url = [NSURL URLWithString:imgstring];


NSData *data = [NSData dataWithContentsOfURL:url];

UIImage *img = [[UIImage alloc] initWithData:data];
cell.imageView.image=img;

please help me out if you can thanks in advance.

Nauman.Khattak
Better post a question showing what code you wrote and how it doesn't work. This would be much more likely to give you useful responses than a "please send me code" request.
sth