HOW TO ADD AN IMAGE ON UITABLEVIEW CELL IN IOS?

Nigel Bunyan

Total Post:20

Points:140
Posted by  Nigel Bunyan
 455  View(s)
Ratings:
Rate this:
I have a Table view in our app. I want to add an image in our table view cell.
Please provide me the code. Thanks.
  1. Tarun Kumar

    Post:214

    Points:1642
    Re: How to add an image on UITableView cell in iOS?

    If you want to add image into the table cell, use code like this:

    UIImageView *img = [[UIImageView alloc]initWithFrame:CGRectMake(1,1, 25, 35)];
    img.image=[UIImage imageNamed:@"imageName.png"];
    [cell addSubview:img];
    [img release];

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!