I add the picture in my UITableView
by JSON
(just pass the URL) and now I want to adjust size of images, I want to adjust them in same size in the main page like thumbnail. thank you.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
// Configure the cell...
City * cityObject;
cityObject = [ citiesArry objectAtIndex:indexPath.row];
cell.textLabel.text = cityObject.cityState;
cell.detailTextLabel.text = cityObject.cityName;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.detailTextLabel.numberOfLines = 4;
NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:cityObject.cityImage] ];
[[cell imageView] setImage:[UIImage imageWithData:imageData] ];
return cell;
}