How to extract delegates from ViewController class?
- by adranle
Hi
I have the problem that my view controller class has too many delegates and starts to get big. I want to write the delegates in separate classes to keep the view controller class small.
For delegates that are programmatically created (like UIAlertViewDelegate) I could do it easily.
The problem is in the delegates assigned in Interface Builder. How can I tell the IB to assign, for example, another class as the UITableViewDelegate or UITableViewDataSource? Or how to choose another IBAction method for a Touch UP inside Event on a button?
One solution would be to delete the connections from IB and write them programmatically at ViewDidLoad, but since I have a lot of ViewControllers, this would take a long time.
any other ideas?