Q:

Package XIB in Swift framework for distribution?

I'm creating a Swift framework so I can distribute it via CocoaPods and Carthage. My question is if it is possible to distribute a .xib files in my framework? If so, how would the consuming developer use it?

A:

You can load your .xib file from your framework like this :
UINib(nibName: "MyXib", bundle: NSBundle(identifier: "bundleName")

or if you know the name of a class in the framework
UINib(nibName: "MyXib", bundle: NSBundle(forClass: MyClass.self)

