, :
@protocol JSDog <NSObject>
- (void)yipe;
@end
@interface JSDog : NSObject
@end
@implementation JSDog
+ (void)initialize {
if ([self isSubclassOfClass:[JSDog class]] && ![self conformsToProtocol:@protocol(JSDog)]) {
NSAssert(false, @"Subclasses of JSDog must conform to <JSDog>.");
}
}
@end
, , NSObject. a @required, : , JSDog <JSDog>, doesn ' t -yipe, ; , <JSDog>, .