New xib in xcode4

I developed an application for the iPhone. Now I would like to do it on the iPad. To do this, I need to create new .XIB files and associate them with my class.

I do not know how to create a new .xib in xcode4. Can someone help me?

Now, to solve this problem, I create a new file with its .XIB, delete .m and .h and bind .XIB with my class.

Thanyou.

+6
source share
2 answers

We also need two more nib files, one for each of the two content views we created. To create them, open the "Resources" folder in the "Groups and Files" panel, so that we create them in the right place, and then press ␣N or select "New File ..." in the "File" menu again. This time, when the assistant window appears, select “User Interfaces” under the iPhone OS header in the left pane.

Select the icon for the View XIB template that will create the content presentation item, and then click Next. When prompted for the file name, enter BlueView.xib. Repeat the steps to create a second nib file named YellowView.xib. Once you do this, you have all the files you need. It's time to start all together.

+2
source

To create an XIB file in Xcode 4, just go to the main menu, File-> New-> New File ... and from there select the User Interface from the iOS section. Then select "View" (if necessary), the device family, and finally save.

Hope this helps.

+8
source

Source: https://habr.com/ru/post/888301/


All Articles