I have a question regarding setting up a custom delegate class for use with UITableView. What I have done is as follows:
- Setup a new class (in sperate *.h and *.m files for the class)
- Conformed that new class to the
<UITableViewDelegate, UITableViewDataSource>
protocols - Added the required methods.
- Created a pointer to the new object using @property and IBOutlet.
- In InterfaceBuilder created and assigned an object template to my new class
- Assigned the dataSource and delegate connections.
This all works fine. My question is if I don't want to use interfaceBuilder to setup and instantiate my new delegate class how do I go about doing that in Xcode instead? More specifically how would I:
- Instantiate the delegate class, would that be created / owned by the controller?
- Set the dataSource and delegate connections?
- What is the best way of doing this?
any help / information is much appreciated.
Gary