0

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?

pfs
  • 477
  • 5
  • 14

2 Answers2

0

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

[myTableView setDataSource:self];
SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191
  • iBrad, thanks but that's not the answer I am looking for. I already knew how to do that. I am trying to find that "setting" that's causing the issue. Thx though. – pfs Nov 26 '11 at 22:01
  • 1
    If you control click your tableview and drag to your File's Owner row does the dataSource option pop up? – SimplyKiwi Nov 26 '11 at 22:37
  • iBrad, thanks for keeping with me. I just tried again and lo and behold, it just worked. I did exactly the same way as I did before. I call an XCode bug. – pfs Nov 27 '11 at 06:38
  • Great! Accept my answer if it helped you out! – SimplyKiwi Nov 27 '11 at 17:06
0

Turns out restarting XCode was the solution. Well perhaps restarting my system too since I did both.

pfs
  • 477
  • 5
  • 14