Hello all
After having read a C# book I just wanted to confirm whether I'm seeing what I think I'm seeing in Objective C.
When you have something like the following, is this one of the constructor methods available to the object being called:
Is the "initWithFormat' one of the available constructors? In C#, I think the constructor has the same name but several combinations of parameters (called overloading??????)
Therefore, if you just wrote "init" then would that perform the most basic setup?
Finally, on methods in general, is the syntax for invoking one of an object's methods basically the following:
[objectname methodname : parametervalue parametername : parametervalue];
I have not yet bought a dedicated Objective C book (I will soon), and I'm used to the "objectname.methodname(parameter, parameter, parameter)" notation.
Many thanks for any help.
After having read a C# book I just wanted to confirm whether I'm seeing what I think I'm seeing in Objective C.
When you have something like the following, is this one of the constructor methods available to the object being called:
Code:
hopRate=[[NSString alloc] initWithFormat:@"%1.2f hops", 1/(2-animationSpeed.value)];
Is the "initWithFormat' one of the available constructors? In C#, I think the constructor has the same name but several combinations of parameters (called overloading??????)
Therefore, if you just wrote "init" then would that perform the most basic setup?
Finally, on methods in general, is the syntax for invoking one of an object's methods basically the following:
[objectname methodname : parametervalue parametername : parametervalue];
I have not yet bought a dedicated Objective C book (I will soon), and I'm used to the "objectname.methodname(parameter, parameter, parameter)" notation.
Many thanks for any help.