Methods with multiple arguments in objective C

前端 未结 3 696
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-29 12:46

If you take this method call for instance(from other post)

- (int)methodName:(int)arg1 withArg2:(int)arg2
{
    // Do something crazy!
    return someInt;
}
         


        
3条回答
  •  借酒劲吻你
    2021-01-29 13:38

    You would call this method as follows:

    int i=[self methodName:arg1 withArg2:arg2];
    

    This is just iOs's way of making the code easier to read.

提交回复
热议问题