Krunal
Krunal

Reputation: 6490

Xcode 4.5 not creating xib file

I have created SimpleView based application, in which i want to add new file with .xib interface but when i add new file then Objective-C class and then subclass of UITableViewCell there option of with xib for user interface is disabled i also want to add xib..

How to add new files with .xib interface ?

Here are screenshots.. 1 2 Thanks for reading..

Upvotes: 1

Views: 2516

Answers (4)

cohen72
cohen72

Reputation: 2988

Make sure also that "iOS" is selected, and not "OSX" when choosing a template for your new file. When "OSX" is selected, the option was disabled in my project.

Upvotes: 4

ganesh manoj
ganesh manoj

Reputation: 977

for UITableViewCell you will not have xib for that we have add an empty view by selecting userinterface while adding new file. Then drag and drop uitableview cell.

Upvotes: 0

Inder Kumar Rathore
Inder Kumar Rathore

Reputation: 39978

I don't know why this is disabled. And I couldn't remembered that was it enable in previous versions of xcode.

But you can add xib for custom cell as described in this tutorial.
Here is the quick steps

  1. Create a simple view XIB
  2. Drag a table view cell into the XIB from the object browser in the bottom right corner
  3. Delete the superfluous view

Upvotes: 4

James Chen
James Chen

Reputation: 10874

Only certain classes such as UIViewController will have the nib option enabled. UITableViewCell is not one of these classes.

Upvotes: 7

Related Questions