Doubt in call tableview function

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

  1. iphonejudy macrumors 6502


    Sep 12, 2008
    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

    Oct 29, 2006
    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


    Staff Member

    Sep 2, 2004
    The Centennial State
    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:
    tableViewCell = [tableView cellForRowAtIndexPath:indexPath];

Share This Page