Call method from AppController in another class

Discussion in 'Mac Programming' started by gonche1124, Sep 12, 2009.

  1. gonche1124 macrumors newbie

    Aug 6, 2009

    I have a method in Appcrontroller which returns the value of a variable, I want to call this method from another class, how can I do this??

    Thank you
  2. lucasgladding macrumors 6502

    Feb 16, 2007
    Waterloo, Ontario
    Assuming your AppController class is the application delegate, you can call the methods with these as the receiver:

    [[NSApplication sharedApplication] delegate] or [NSApp delegate]
  3. gonche1124 thread starter macrumors newbie

    Aug 6, 2009
    Thank you, I will try that...

Share This Page