【发布时间】:2011-05-21 06:35:00
【问题描述】:
我怎样才能使从我的基类继承的任何类都被强制覆盖特定方法?我不想使用协议,因为那不会使这种行为自动化。
@interface MyBaseClass : NSObject
{
}
- (void)performAnAction;
@end
@implementation MyBaseClass
- (void)performAnAction
{
@throw([NSException exceptionWith...]);
}
@end
【问题讨论】:
标签: objective-c inheritance overriding oop