I've been self teaching myself Objective-C for the past week, having trouble understanding this concept. An extract from the book I'm reading says
Quote:
To get a class object from a class name, you write the following,
[Square class]; // where Square is the class name.
|
From reading this what I understand is that sending the message 'class' to a class name returns an object of that type?
So following this logic, would
Code:
Square* sqaure = [[Square alloc] init];
// equivalent to
Square* square = [Square class];