I am wondering which of the two following methods is the correct or preferred one to retrieve the superclass of a Class
variable:
Class getSuperclass(Class cls) { return [cls superclass]; }
Class getSuperclass(Class cls) { return class_getSuperclass(cls); }
Well, the docs on class_getSuperclass()
say this:
You should usually use NSObject‘s superclass method instead of this function
So, I'd go with door #1.