Search code examples
iosxcode4xcode4.2

XCode 4 Won't Let Me Connect UITableView to its data source


For some reason, I am unable with XCode 4 to connect a UITableView to the File's Owner in the XIB file. This connection is something I have done countless of times.

The File's Owner is a class which derives from UITableViewController.

I even tried the following 1) Used Interface Builder from XCode 3 (still have it installed) and there I am able to connect it no problem

2) In a different project, with XCode 4 I put a UITableView in a view and was able to connect it to the File's Owner even though that didn't derive from UITableViewController or implemented the data source protocol

This problem is happening to a couple XIB files in this project. Note this project and those XIBs were created using XCode 3.

Is that a bug or I am missing something?


Solution

  • Instead of connecting your UITableView to your DataSource in Interface Builder, just connect it like so:

    [myTableView setDataSource:self];