View Full Version : Tableview icon

Aug 16, 2011, 12:51 PM
So, forgive my newbieness. I'm not an objective-c developer.

But, I've created a sample application that consists of a table, pulling entries in cells from a database. Then, when you click on that cell, it goes to a text & image view where it displays a number, pulled from the database, and a pie chart.

Now, I want to put icons on the left side of each cell (Preferably a different icon in each, hosted in the workspace in a .png). How/where would I put that code, and..what code would I even put?

Aug 16, 2011, 02:37 PM
That code belongs in the -(UITableViewCell *)tableView: (UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath method. You can use an "if" statement or better yet a "switch" statement to add a unique icon in each cell.