The checkbox to create a .xib file in Xcode 6 seems to be disabled. I can not find any way to enable it again. Does anybody know if this is possible?
Asked
Active
Viewed 1.2k times
4 Answers
64
Make sure you didn't accidentally select the OS X Cocoa Class file type instead of iOS Cocoa Touch Class.
Incorrect:
Correct:

Mike Akers
- 12,039
- 14
- 58
- 71
-
great bit, that didn't stop me from accidentally creating it without the xib though – Ahmed Elashker Oct 05 '16 at 20:55
4
Creating xib files in xcode 6 is,
First of all create empty project as, Go to-> File > New >Project, Then select IOS >Other > Empty then Next After that creating a xib file as, Go to->File >New> File then IOS > Cocoa Touch Class and then NEXT Then select Viewcontroller and check for the "Also create XIB file" Then Next
This will create a empty project as well as xib file.

Purushottam Padhya
- 338
- 2
- 9
-
5I think, you didn't select the subclass as UIViewController on that page. Try this one and then check for the XIB file. Thank you! – Purushottam Padhya Jan 14 '15 at 05:33
3
I had encountered this problem. Below is fix for this :
- Right click on files present in
Project Navigator
section. Select
New File
.OR
Select
File
from list of tab present in XcodeSelect
New -> File
OR
Simply press
cmd+N
Choose template for your new file as
iOS
not OS X, tvOS or watchOS.

Jayprakash Dubey
- 35,723
- 18
- 170
- 177