Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
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....
 

mysticwhiskey

macrumors newbie
Mar 31, 2008
25
0
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....

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.
 

Sbrocket

macrumors 65816
Jun 3, 2007
1,250
0
/dev/null
but the method for allocation of cells for each row is not getting executed.

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.