I created first my TestViewController.h and *.m. Afterwards my TestView.xib.
Now I need to tell my xib: "Yes, please take the class TestViewController as my File's Owner".
I open up my xib, go to the Identity Inspector of its fileOwner and choose under "Custom Class" TestViewController.
But this seems not enough - as when I open up the TestView.xib, and then choose the "Assistent Editor View" it should bring up the corresponding ViewController on the right part of the split screen - in my case the "TestViewController.h". But it doesn't !
Is it necessary to bind the xib in any way to its viewcontroller by dragging lines to files like you do it with outlets and actions?
Remember to name your Xib file exactly as your UIView subclass and set the type of the main view in that Xib file correctly. As soon as SE-0068 will be implemented one could drop the protocol and move the function directly into the UIView extension.
Click to select the xib. Now, select the file's owner. In the attribute panel on the right side, choose the third tab, "Identity Inspector". There is a header named Custom Class. Give your view controller's name there. After this, you can connect the elements with the file's owner.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With