1.文档
Summary
Returns a Boolean value that indicates whether the receiver is an instance of given class or an instance of any class that inherits from that class.
@protocol NSObject
- (BOOL)isKindOfClass:(Class)aClass;
@end
2.举例
TIMCustomElem * elem1 = (TIMCustomElem*)[msg getElem:0];
if ([elem1 isKindOfClass:[TIMCustomElem class]]) {...}