Chatar Veer Suthar
Chatar Veer Suthar

Reputation: 15639

how to show text and image in Cell of UITableViewController?

I am inheriting UITableViewController, and I want it sell something like as below output

Name Image

Name2 Image2

Name3 Image3

where these are different cells in table, how can I do implements such thing, any idea?

Upvotes: 0

Views: 489

Answers (1)

maciek
maciek

Reputation: 11

In your method:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

Insert:

cell.imageView.image = [UIImage imageNamed:@"icon.png"];

Upvotes: 1

Related Questions