ValentiGoClimb
ValentiGoClimb

Reputation: 750

new xib in xcode4

I develped an iPhone app. Now i would like to do it in iPad. To do this I have to create the new .XIB files and linked to his Class.

I don't know how to create a new .xib in xcode4. Could somebody help me?

Now, to solve this problem, I create a new file with his .XIB, delete the .m & .h and link the .XIB with my class.

Thanyou.

Upvotes: 6

Views: 4375

Answers (2)

rptwsthi
rptwsthi

Reputation: 10172

We also need two more nib files, one for each of the two content views we just created. To create these, single-click the Resources folder in the Groups & Files pane so that we create them in the correct place, and then press ␣N or select New File... from the File menu again. This time, when the assistant window comes up, select User Interfaces under the iPhone OS heading in the left pane .

Select the icon for the View XIB template, which will create a nib with a content view, and then click the Next button. When prompted for a filename, type BlueView.xib. Repeat the steps to create a second nib file called YellowView.xib. Once you’ve done that, you have all the files you need. It’s time to start hooking everything together.

Upvotes: 2

msoler
msoler

Reputation: 2960

In order to create a XIB file in XCode 4, just go to the main menu, File->New->New File..., and from there choose User Interface from the iOS section. Then choose View (if that's what you want), device family and finally save.

Hope it helps.

Upvotes: 8

Related Questions