Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fireshot91

macrumors 601
Original poster
Jul 31, 2008
4,721
1
Northern VA
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?
 

Shawnpk

macrumors 6502
Jan 13, 2011
350
0
Los Angeles, CA
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.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.