1

I need to resize the same image size in uitableviewcell. I using the same page, not using the another view. I placed everything and ran. But i could not place correctly positioned how to do that. Thanks in Advance. Here is the code

 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
int count = 0;
if(self.editing && indexPath.row != 0)
    count = 1;

if(indexPath.row == ([imarry count]) && self.editing)
{
    cell.textLabel.text = @"ADD";
    cell.image= [UIImage imageNamed:@""];
    return cell;
}
cell.textLabel.text = [arry objectAtIndex:indexPath.row];
cell.image=[imarry objectAtIndex:(indexPath.row)];
return cell;    
 }


 - (void)imagePickerController:(UIImagePickerController *)UIPicker didFinishPickingImage:(UIImage *)info editingInfo:(NSDictionary *)dictionary
 {
[UIPicker dismissModalViewControllerAnimated:NO];
[imarry insertObject:info atIndex:[imarry count]];
[Table reloadData];
NSLog(@"Uploaded image");
}

Image picture is

enter image description here

Ravi Kumar Karunanithi
  • 2,151
  • 2
  • 19
  • 41
  • Checkout these suggestions: [SO post](http://stackoverflow.com/questions/1055495/uitableviewcells-imageview-fit-to-40x40) And this [SO post](http://stackoverflow.com/questions/2788028/how-do-i-make-uitableviewcells-imageview-a-fixed-size-even-when-the-image-is-sm) – user523234 Dec 27 '11 at 05:48

1 Answers1

2

image property is Deprecated in iOS 3.0. You can set the imageview of cell but it is readonly property so you can't resize it.

By adding the custom imageview you can solve your purpose.

Reena
  • 845
  • 6
  • 8