Unknown class in Interface Builder file. Xcode 6 and Swift Unknown class in Interface Builder file. Xcode 6 and Swift xcode xcode

Unknown class in Interface Builder file. Xcode 6 and Swift


I used to encounter the same issue, I finally found that the StoryBoard's Target Membership has been set incorrectly

enter image description here.


I was getting the same problem but I discovered that I had inadvertently assigned a non-existing custom class to the view object managed by my view controller. So in the storyboard document view, I selected the badly configured view object, then in the identity inspector, deleted the bad custom class displayed for it (by backspacing and hitting return). That took care of the problem.

In my case, the custom class should be assigned to to the view controller, and not the view object managed by the controller.


I hit a similar issue when I changed the default Xcode project's UIViewController subclass to instead be a subclass of UITableViewController. (I made this change in the class source file, nothing to do with Storyboard).

I then went and typed my new class name into the IB "Class" field of the default "view" in the Storyboard. It would not autocomplete my class name, and then gave the Unknown class in Interface Builder file error when run.

The solution was to delete the default UIViewController object from the Storyboard, then add a new UITableViewController. Then, set that object's Class in IB to be your custom class.

It seems like the original question may be hitting this issue, as the first screenshot's class is ...ViewController and the second is ...TableViewController.