Connection to TableVIew
Create a new subclass of UITableViewController in Xcode Move the known-good implementations of numb开发者_如何学编程erOfSectionsInTableView: 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?
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.
精彩评论