The corresponding Swift code is
// Swift 3 and later:
Bundle(for: ClassInTestTarget.self)
// Swift 1, 2:
NSBundle(forClass: ClassInTestTarget.self)
ClassInTestTarget.self
return the class object for the “ClassInTestTarget” class.
The corresponding Swift code is
// Swift 3 and later:
Bundle(for: ClassInTestTarget.self)
// Swift 1, 2:
NSBundle(forClass: ClassInTestTarget.self)
ClassInTestTarget.self
return the class object for the “ClassInTestTarget” class.