一番簡単な方法は、controller.swift
とcontroller.xib
のファイル名を同じにする。
もしどうしても同じ名前にできない場合は、明示的にControllerからxibを紐付けることも可能。
override func loadView() {
if let view = UINib(nibName: "xibName", bundle: nil).instantiateWithOwner(self, options: nil).first as? UIView {
self.view = view
}
}