title: UITableView superClass for delegate?
body: <p>A quick question, I am setting a delegate for UITableView and I have a question regarding setting the delegate and dataSource properties. I have noticed that the properties for delegate and dataSource are not available, I was thinking that adopting the  protocols would make them available. But I am now thinking that I maybe have the superclass for my delegate class wrong.</p>
  
  <p>Currently I have:</p>
  
  <pre><code>-(void)viewDidLoad {
      TestDelegate *tempDelegate = [[TestDelegate alloc] init];
      [self setMyDelegate:tempDelegate];
      // setDelegate
      // setDataSource
      [tempDelegate release];
      [super viewDidLoad];
  }
  </code></pre>
  
  <p>My interface for TestDelegate looks like:</p>
  
  <pre><code>@interface TestDelegate : NSObject &lt;UITableViewDelegate, UITableViewDataSource&gt; {
      NSArray *listData;
      int myCounter;
  }
  </code></pre>
  
  <p>Can I ask if the above should be:</p>
  
  <pre><code>@interface TestDelegate : UITableView &lt;UITableViewDelegate, UITableViewDataSource&gt; {
      NSArray *listData;
      int myCounter;
  }
  </code></pre>
  
  <p>gary</p>
  
  <p><strong>EDIT:</strong> I think it might be on the right track: my delegate superClass should be NSObject, I also have a UITableView in Interface Builder.</p>
  
  <p>I have added @property(nonatomic, retain)IBOutlet UITableView *myTableView; in Xcode and connected this to my UITableView in IB. I can now access the delegate and dataSource properties in Xcode via the IBOutlet.</p>