开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜