Lately i run into some trouble when i tried to integrate a viewcontroller from another project to a new one.
As usual i dragged the files (classes + XIB) to the new project, added a new uiviewcontroller to the storyboard and set the class to the newly imported.
Starting the app i was greeted with an empty white view and the content of the XIB was ignored.
After some googling i found the needed trick: a view is is added automatically when you add a UIViewController to your storyboard:
I had to delete this “view”.
When the storyboard-engine does not get a view for the controller it falls back to looking for a XIB with the same name as the class.
I’m learning swift. And these series of posts is about the troubles i am facing. Mostly because i did not spend enough time to completely understand the documentation, but also because swift changes fast and LOTS of examples and posts on the internet are already out of date.
For example i found heaps of broken “cellForRowAtIndexPath” implementations.