Methods with objects

Discussion in 'Mac Programming' started by diogosgp, Jul 6, 2011.

  1. diogosgp, Jul 6, 2011
    Last edited by a moderator: Jul 7, 2011

    diogosgp macrumors newbie

    Joined:
    Jun 26, 2011
    #1
    Hi guys, my doubt is when I know that I have to use a method like this:
    Code:
    [myCombo addItemsWithObjectValues:myArray];
    or

    Code:
    myArray = [NSMutableArray arrayWithObjects: object1, object2, object3, nil];
    The first example I used the name of the object + the method.
    The second example I used the name of the class + the method.
    I know that the first one I'm not adding to the value but how I'm gonna know which one to use?

    Cheers
     
  2. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
    You know based on whether the method is documented with a leading - for instance methods called on an object or a + for class methods called on the class.

    -Lee
     

Share This Page