I created a test project in ios 8 beta 4 which as a main view controller and a second view controller created as a UIViewController subclass with a xib file.
I put a
I had a very similar problem on Xcode 10.1 and iOS 12.
This code worked:
class ExampleViewController: UIViewController {
init() {
super.init(nibName: "ExampleViewController", bundle: nil)
}
}
But passing nil as nibName made it not load the XIB.
When specifying the class name explicitly via @objc("ExampleViewController") this fixed it.
The problem was caused by the module name starting with the letters 'UI' (the project was called UIKitExample). When I renamed the target to something else, this fixed the problem.