UITableViewDelegate problem

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

  1. sujithkrishnan macrumors 6502

    Joined:
    May 9, 2008
    Location:
    Bangalore
    #1
    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

    Joined:
    Mar 31, 2008
    #2
    Hi,

    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

    Sbrocket

    Joined:
    Jun 3, 2007
    Location:
    /dev/null
    #3
    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