How to call a method from another method in a C object?

-(void) callme {
//statements
here I call another method "callmeagain"
}

}

But it does not work. Is there any other way to do this?

0
source share
2 answers

To call the ObjC method, use the syntax [foo methodName:param andAlso:param2 …]In your case, try

-(void)callme {
  [self callmeagain];
}
+5
source

Another method may be

[self performSelector:@selector(callmeagain)]; 

This is basically the same as Kenny Suggestion.

+1
source

All Articles