Calling a method from a method

Discussion in 'iOS Programming' started by spire.bt, Aug 26, 2010.

  1. spire.bt macrumors newbie

    Joined:
    Apr 8, 2010
    #1
    It might be a stupid question but I am a beginner so how can i do this

    Code:
    -(void)Method1{
          .
          .
          .
    }
    -(void)Method2{
         .
         .
         .
         empty value of a text field
         call Method 1     
    }
    
     
  2. spire.bt thread starter macrumors newbie

    Joined:
    Apr 8, 2010
    #2
    Dumb Question found it sorry guys

    Code:
    textFieldAnswer.text = [NSString stringWithFormat:@""];
    [self Method1];
     
  3. Sykte macrumors regular

    Joined:
    Aug 26, 2010
    #3
    Messaging

    Don't think of it as calling a method as you would in other languages. In objective c you are sending a message to a receiver "object".

    So you will always need to have a receiver.
     

Share This Page