Call method from AppController in another class

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

  1. gonche1124 macrumors newbie

    Joined:
    Aug 6, 2009
    #1
    Hi,

    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

    Joined:
    Feb 16, 2007
    Location:
    Waterloo, Ontario
    #2
    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

    Joined:
    Aug 6, 2009
    #3
    Thank you, I will try that...
     

Share This Page