I want to create a Class object in this way:
Class c = [Class classNamed:[NSString stringWithFormat:@”%sview”, [_shapeClass name]]];
My problem is this error message: “error: expected expression before ‘Class'”.
What do you think? What’s the problem? Thank you for replys.
Edit:
I want to do this in a switch case.
There is no class named “Class”. “Class” is the type of a pointer to a class object. Anyway, there is a
classNamed:method inNSBundle, which might be what you were looking for:If you know the class is already loaded, you can also get it like this: