Never used, but I think it should be this:
Swift <= 2.x
NSBundle(forClass: self.dynamicType)
Swift 3.x
Bundle(for: type(of: self))
Swift 3:
Bundle(for: type(of: self))
Swift 5
Bundle(for: Self.self)
I personally like:
let bun = NSBundle(forClass: self.classForCoder)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With