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

Total Post:20

Points:140
Posted on    December-24-2015 4:17 AM

 iPhone iPhone  Ios  Objective C 
Ratings:


 1 Reply(s)
 229  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:213

Points:1635
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