I've recently started learning Objective C and started making some basic things in Xcode.
It's been going pretty well the last couple of weeks but i'm stuck with something.
I know that NSString *myString would be making an instance of the object NSString called myString.
What does it mean when code is written as (NSString*) myString?
I don't get what the brackets are for and why the asterisk is inside the brackets. I just used NSString as an example but i've seen it with other things.
I've seen this in some example code but want to understand it before moving on.
It's probably a really basic question so i'm sorry but it's my first OO Language.
Thanks
It's been going pretty well the last couple of weeks but i'm stuck with something.
I know that NSString *myString would be making an instance of the object NSString called myString.
What does it mean when code is written as (NSString*) myString?
I don't get what the brackets are for and why the asterisk is inside the brackets. I just used NSString as an example but i've seen it with other things.
I've seen this in some example code but want to understand it before moving on.
It's probably a really basic question so i'm sorry but it's my first OO Language.
Thanks