objc方法isMemberOfClass,用来判别实例是由哪个类实例化的-

printf( c1 is Member of Class1 !\\n\\n ); } if ([c2 isMemberOfClass:[Class2 class]]==YES) { printf( c2 is Member of Class2 !\\n\\n ); } return 0; } 输出结果: c1 is Member of Class1 ! c2 i dj520.com小说阅读网