Doubt in call tableview function

Discussion in 'iOS Programming' started by iphonejudy, Mar 25, 2009.

  1. iphonejudy macrumors 6502

    iphonejudy

    Joined:
    Sep 12, 2008
    #1
    How to call

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


    I used

    tableView:ableView cellForRowAtIndexPath:indexPath


    But its not working.

    Can anyone twell me solution?
     
  2. eddietr macrumors 6502a

    Joined:
    Oct 29, 2006
    Location:
    Virginia
    #2
    So you're creating a custom tableview? What exactly are you trying to accomplish?

    If you take the time and effort to post a little more context, it would make it much easier for people to help you.
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    Are you trying to set the contents of the cell or retrieve the cell itself?

    If you are trying to set the contents, you don't use tableView:cellForRowAtIndexPath: directly. It is called as part of the table view data source methods to determine what to show for a particular cell. What you may want to do is call reloadData on your table view, and then put some logic, if needed, into your tableView:cellForRowAtIndexPath: to handle the new content.

    If you are trying to retrieve a cell, use cellForRowAtIndexPath: like so:
    Code:
    tableViewCell = [tableView cellForRowAtIndexPath:indexPath];
     

Share This Page