How to reuse delegate implementations among view controllers

22 views
Skip to first unread message

Zhisheng Huang

unread,
Jul 23, 2012, 4:38:47 PM7/23/12
to iphone-appd...@googlegroups.com

Hi folks,

I am not sure if this is an appropriate place to ask a general objective C question, but i want to give a try anyway.

So there is this project I am working on, a couple of customed UIViewControllers(e.g. Controller1, Controller2, Controller3). They all confirm to a delegate and have impementations for all the required delegate methods.

My question is: I know that for Controller1, Controller2 and Controller3, all those implementation for the delegate methods are the same, how can I abscact it and re-use all this same codes into one place? Maybe use another class(DelegateClass) as a member variable inside those UIViewControllers? 

Again, thanks for your time and patience for taking a look at my question.

Best regards,

-Zhi


 

Reply all
Reply to author
Forward
0 new messages