call user defined method

Discussion in 'iOS Programming' started by iphonejudy, Apr 8, 2009.

  1. macrumors 6502

    iphonejudy

    Joined:
    Sep 12, 2008
    #1
    Hi,

    I need to call the user defined method.But i got error,whats the syntax?


    //declaration
    -(void) news;

    //definition
    -(void) news
    {
    ----------
    ---------

    }

    calling function

    myclass:news;//got error

    }
     
  2. macrumors 68010

    Joined:
    Aug 23, 2008
    #2
    Code:
    [self oughtaReadABook];
    
    - (void)oughtaReadABook {
      //pick up a damn book and read if you're stuck on the basic. 
    
    }
     
  3. macrumors member

    Joined:
    Feb 26, 2009
    #3
    Wherever you want to access the method inside the .m put this piece of code.

    [self news];
     

Share This Page