Iphone – Connection to TableVIew

iphone

Create a new subclass of UITableViewController in Xcode
Move the known-good implementations of numberOfSectionsInTableView: tableView:numberOfRowsInSection: and tableView:cellForRowAtIndexPath: to the new subclass
Drag a Table View Controller to the top level of the existing XIB in InterfaceBuilder, delete the View/TableView that are automatically created for this Table View Controller, then set the Table View Controller's class to match the new subclass
Remove the previously-working Table View's existing dataSource and delegate connections and connect them to the new Table View Controller..

Hello,Above is the code suggested by you to perform the tableView.

I Implemented AS Such.But,problem is – I am not getting any output.i mean,my output window apears but table is not displayed.

Can anyone help me pls?

Best Answer

Put a breakpoint in tableView:numberOfRowsInSection: then run the app. I'll bet your method isn't being called. If not, you need to figure out why your new class isn't being registered as the data source for the table view.

If it is being called, is it returning 0? That would cause no rows to be displayed. If it isn't returning 0, check your tableView:cellForRowAtIndexPath: method to see how it is initializing the cells. It could be initializing them with blank labels so the table looks empty.

Related Topic