Can not create an iPhone xib file with Xcode 6

前端 未结 4 1839
离开以前
离开以前 2020-12-15 05:36

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?

相关标签:
4条回答
  • 2020-12-15 05:56

    I had encountered this problem. Below is fix for this :

    1. Right click on files present in Project Navigator section.
    2. Select New File.

      OR

      Select File from list of tab present in Xcode

      Select New -> File

      OR

      Simply press cmd+N

    3. Choose template for your new file as iOS not OS X, tvOS or watchOS.

    1. Select Cocoa Touch Class and then press Next

    2. Enter Class name and select subclass of it.

    3. Checkmark Also create XIB file.

    4. Select device type and Language and then click Next

    5. Click on Create and make sure that Targets is selected.

    0 讨论(0)
  • 2020-12-15 05:59

    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.

    0 讨论(0)
  • 2020-12-15 06:02

    FYI, you can create xib file by follow.

    enter image description here

    0 讨论(0)
  • 2020-12-15 06:02

    Make sure you didn't accidentally select the OS X Cocoa Class file type instead of iOS Cocoa Touch Class.

    Incorrect:

    Screenshot of creating an OS X Cocoa Class

    Correct:

    Screenshot of creating an iOS Cocoa Touch Class

    0 讨论(0)
提交回复
热议问题