Learning basic Objective-C and have a few beginner questions.
How would I define and implement a method which takes two (or three) arguments within my class?
I find the syntax to pass multiple arguments into a method really confusing. I would really appreciate any help. thanks.
Learning basic Objective-C and have a few beginner questions. How would I define and
Share
Here’s an example of a simple 2-argument method implementation:
You would invoke it like:
Is that what you’re looking for?
Edit: Based on your comment below, it seems like you’re missing a fundamental feature of Objective-C messaging – that the method name is interleaved with the arguments. Check out this page from The Objective-C Programming Language for all the detail you need.