I have made a UIViewController subclass without a .xib file, thinking I would not need it. Now I realize that it would be very useful, but I am unsure of how to add a .xib file to it. Could anybody help?
Asked
Active
Viewed 8,781 times
1 Answers
17
Create a .xib file, then go into interface builder, and then into the 'Identity Inspector' panel; there you will find a field called "class" under Custom Class header, select the class that you want to be added to your .xib file from the dropdown. (Make sure you select the File's Owner in the little sidebar of the xib display area).

SmileBot
- 19,393
- 7
- 65
- 62

Haris Hussain
- 2,531
- 3
- 25
- 38
-
how do I make a .xib file by its self? – Fitzy Apr 11 '12 at 11:12
-
3Press 'command+n', there will open a panel for creating new files, in the left column, under 'iOS' choose 'User interface' and then 'View'. There you go. – Haris Hussain Apr 11 '12 at 11:19
-
2Also make sure you set the **view** outlet. http://stackoverflow.com/questions/4763519/loaded-nib-but-the-view-outlet-was-not-set-new-to-interfacebuilder – Bojan Dimovski Jul 24 '13 at 09:44