I would like to implement init(coder aDecoder: NSCoder!) in a superclass, and use it in all subclasses by calling a class method on the particular subclass in t
[DELETED]
use dynamicType as Antonio suggested in his answer
class Test : NSObject {
class func dummy() -> String {
return "t"
}
init() {
super.init()
println("\(self.dynamicType.dummy())")
}
}
class Test1 : Test {
override class func dummy() -> String {
return "t1"
}
}
class Test2 : Test {
override class func dummy() -> String {
return "t2"
}
}