【发布时间】:2012-01-02 17:10:38
【问题描述】:
我想创建NSMutableArray 的子类,需要重写-initWithObjects: 方法。
但是如何调用[super xxx];?
- (id) initWithObjects:(id)firstObj, ... {
[super initWithObjects:firstObj]; // Error: Missing sentinel in method dispatch
// Error: The result of a delegate init call must be immediately returned or assigned to "self"
}
谢谢。
【问题讨论】:
标签: objective-c cocoa nsarray subclass