Tableview icon

Discussion in 'iPhone/iPad Programming' started by fireshot91, Aug 16, 2011.

  1. macrumors 601

    fireshot91

    Joined:
    Jul 31, 2008
    Location:
    Northern VA
    #1
    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?
     
  2. Shawnpk, Aug 16, 2011
    Last edited: Aug 16, 2011

    macrumors 6502

    Joined:
    Jan 13, 2011
    Location:
    Los Angeles, CA
    #2
    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.
     

Share This Page