UITableViewDelegate problem

Discussion in 'Mac Programming' started by sujithkrishnan, May 14, 2008.

  1. sujithkrishnan macrumors 6502

    May 9, 2008
    Hi guys,

    I came across a problem regarding the usage of UITableViewDelegate for one of my apps.

    As it contains many methods , i implemented almost all and i found that only two are executing and the third method is not executing.

    ( delegate methods are called when i call reloadData, and the noOfSections and noOf Rows are gettiing initialized, but the method for allocation of cells for each row is not getting executed.

    Kindly help me....
  2. mysticwhiskey macrumors newbie

    Mar 31, 2008

    It's a bit hard without seeing your code, but I'm wondering if you have set the UITableView's dataSource property to a valid UITableViewDataSource object? Without this, the tableview won't actually display anything, thus probably leading to the situation you're seeing where the delegate methods aren't called because they aren't needed.

    Just guessing though without seeing the code.
  3. Sbrocket macrumors 65816


    Jun 3, 2007
    These methods are part of the UITableViewDataSource protocol rather than the protocol for UITableViewDelegate. Make sure that your class implements both protocols and that you set myTableView.dataSource = yourDataSourceClass.

Share This Page