Looked for an answer for this question, but I haven\'t found a suitable one yet. I\'m hoping you guys (and gals) can help me out! (This is for an iPhone app)
Alrig
What you want to do is to make the two controllers share a common superclass:
UIViewController : MyAwesomeViewController : ViewController1
: ViewController2
commonMethod:
would then reside in MyAwesomeViewController. Also, don't start method names with capital letters. :)
To elaborate:
+@interface MyAwesomeController : UIViewController {
-@interface ViewController1 : UIViewController { // and ditto for ViewController2
+@interface ViewController1 : MyAwesomeController {