UITableView setting standalone delegate object?

Posted by fuzzygoat on Stack Overflow See other posts from Stack Overflow or by fuzzygoat
Published on 2010-05-07T11:46:13Z Indexed on 2010/05/07 11:48 UTC
Read the original article Hit count: 271

Filed under:
|
|

Hi have setup a sample application using a UITableView. Initially I did this by conforming my controller to and , added a tableView in IB and connected "datasource" & "delegate" to Files Owner. It all works so thats good.

What I have been trying out is creating my own class for the delegate. I created a new class and added and , but quickly found I could not connect the tableView>dataSource / delegate. To solve this I added an "Object" (NSObject) in IB and set it to my new class. I then connected the dataSource and delegate outlets to this object. It sort of works, the app runs and displays the tableView, but when I try and scroll the table the app crashes. Can I ask if I am going about this the right way?

gary

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cocoa-touch