Home > DeveloperSection > Forums > How to add an image on UITableView cell in iOS?
Nigel Bunyan
Nigel Bunyan

Total Post:20

Posted on    December-24-2015 4:17 AM

 iPhone iPhone  Ios  Objective C 

 1 Reply(s)
 402  View(s)
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.

Tarun Kumar

Total Post:214

Posted on    December-25-2015 10:09 PM

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];

Don't want to miss updates? Please click the below button!

Follow MindStick