id copy = [[[self class] alloc] init]; // Objective-C
// ??? in siwft
What's the counterpart in swift?
Are you looking for something like this?
class foo {
var bar: Int
required init() {
bar = 42
}
}
var a = foo()
var copy = a.dynamicType()