I am baffled by the errors arising while trying to initialize an instance of an array in a class. The comments below are the errors xcode 6 is showing.
I have created a class. It is having instance of NSMutableArray. I want to initialize the array (hence calling self.instancename.init()). It complains if I don't. It complains if I do.
import Foundation
class testclass:NSObject {
var list_of_things:NSMutableArray;
init (){ // Designated initializer for 'testclass' cannot delegate (swith self.init);
// did you means this to be a convenience initializer?
self.list_of_things.init();
// 'init' can only refer to the initializers of 'self' or 'super'
super.init()
// Initializer cannot both delegate ('self.init') and chain to a superclass
// initializer ('super.init')
}
}