目标C中具有多个参数的方法 [英] Methods with multiple arguments in objective C
本文介绍了目标C中具有多个参数的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果您采用这种方法来调用实例(从其他 post )调用
If you take this method call for instance(from other post)
- (int)methodName:(int)arg1 withArg2:(int)arg2
{
// Do something crazy!
return someInt;
}
withArg2
是否实际上已用于此方法中的任何内容?
Is withArg2
actually ever used for anything inside this method ?
推荐答案
withArg2
是方法名称的一部分(如果要引用文档中的方法,通常不带参数methodName:withArg2:
来编写),所以不,它不用于方法内部的任何内容.
withArg2
is part of the method name (it is usually written without arguments as methodName:withArg2:
if you want to refer to the method in the documentation), so no, it is not used for anything inside the method.
这篇关于目标C中具有多个参数的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文