I think the Objective-C tutorials are pretty good, but have a few questions.
From 25 minutes into the first tutorial an NSString variable is given the name ‘title’ then just after this, a method is declared called ‘title’.
Is it ok / usual in objective-C to give methods and variables the same name, I seem to remember variables and functions shouldn’t be given the same name when programming in C.
Also I’m finding the use of * a bit confusing, or at least the syntax positioning of it.
When the title string is declared
NSString *title; There seems to be a deliberate space after NSString and the asterisk. so my assumption would be that the * and ‘title’ are together as one thing.
This deliberate space looks a little strange in the method declaration when the brackets suggest otherwise.
Is the * part of the return type NSString* or part of the method name *title ? or a different answer :-)
Forgive my ignorance, I’m just starting out in Objective C and get confused very easily.