Getting name of the class from an instance

Robin picture Robin · Feb 7, 2010 · Viewed 65.5k times · Source

I have the following problem: I get an instance of a class passed and want to know the name of the class of this instance. How to get this?

Answer

CiNN picture CiNN · Feb 7, 2010

NSStringFromClass([instance class]) should do the trick.