I am making a Swift 3 module. So I need to know the bundle associated with a class in that module. In Swift 2 this was:
let bundle = NSBundle(forClass: self.dynamicType)
How do I appropriately do this in Swift 3?
Solution:
let bundle = Bundle(for: type(of: self))
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