How to call a method from another method in objective C?
-(voi开发者_如何学JAVAd) callme {
//statements
here I call another method "callmeagain"
}
}
But it is not working. Is there another way to do it?
To call an ObjC method, use the syntax [foo methodName:param andAlso:param2 …]
In your case, try
-(void)callme {
[self callmeagain];
}
Another Method could be
[self performSelector:@selector(callmeagain)];
It is basically the same thing as Kenny's Suggestion
精彩评论