View Class Known at Interface Builder Time Not Known at XIB Unarchive Time
View Class Known at Interface Builder Time Not Known at XIB Unarchive Time
- Subject: View Class Known at Interface Builder Time Not Known at XIB Unarchive Time
- From: Thomas Wetmore <email@hidden>
- Date: Sat, 30 Jul 2016 20:19:17 -0400
I have a workspace with two Swift projects:
1. A framework with a few custom views.
2. An application intended to test the views. The application has the framework in its build with binaries list.
The application consists of two window controllers and their nib files, and other boiler plate. One window controller controls the main window which has a button that should cause the creation and showing of the second controller and its window. The second window has two views on its content view, a button and a view from the framework. The interface builder knows about the class of the view from the framework because the class dropdown menu in the identity inspector includes the name of the view class.
Breakpointing the code, the second window controller is created correctly when its init(windowNibName: String) method is called. However, when I call that controller’s showWindow method I get the following error message:
TestHarness[21321:10542055] Unknown class TableauView in Interface Builder file at path /Users/ttw4/Library/Developer/Xcode/<removed>/TestHarness.app/Contents/Resources/CardTableauWindow.nib.
I interpret this to mean that when the xib gets read at showWindow time, the TableauView (the view from the framework), has become invisible or undeclared or undefined somehow and the unarchiving code doesn’t know what a TableauView is. At interface building time the name is known, but at run time and unarchive the xib time the name seems no longer to be known. The framework is imported in the controller, and the views are declared public in the framework. Is there something else I need to do to make views defined in frameworks to be visible?
More likely I am forgetting something basic.
I am using Swift 3 on Xcode 8.3 beta on macOS 10.11.6.
Thanks,
Tom Wetmore
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden