从来没有使用,但我认为应该是这样的:
原文链接:https://www.f2er.com/swift/321540.htmlSwift = 2.x
NSBundle(forClass: self.dynamicType)
Swift 3.x
Bundle(for: type(of: self))
Swift = 2.x
NSBundle(forClass: self.dynamicType)
Swift 3.x
Bundle(for: type(of: self))