In xcode 3. X, convert XIB from iPhone to IPAD through the create iPad version menu.
However, in xcode 4.x, this menu cannot be found. After some exploration, I found that XIB can be converted into an iPad using the following method.
1. Modify the XIB source file
The XIB file is actually an XML file. You can edit and modify it as text. In project navigator, right-click the XIB file and select "open as-> source code ".Source codeView the XIB file and find "com. apple. interfacebuilder3.cocoatouch. change the XIB line to "com. apple. interfacebuilder3.cocoatouch. iPad. XIB ", that is, in ". XIB "insert ". iPad ".
Press replace + F to open the search box and click replace to change the replace mode. Replace all "ibcocoatouchframework" in the XIB file with "ibipadframework.
Press seconds + S to save the changes.
2. Modify the XIB view size.
Right-click the XIB file, select "open as-> interface builder-Ios", and open it in IB mode.
Select the Root View (uiview) in the xib file, find the size option on the property panel, and change it to full iPad screen.
Now you can have an iPad version of XIB.
However, in xcode 4.x, this menu cannot be found. After some exploration, I found that XIB can be converted into an iPad using the following method.
1. Modify the XIB source file
The XIB file is actually an XML file. You can edit and modify it as text. In project navigator, right-click the XIB file and select "open as-> source code ".CodeView the XIB file and find "com. apple. interfacebuilder3.cocoatouch. change the XIB line to "com. apple. interfacebuilder3.cocoatouch. iPad. XIB ", that is, in ". XIB "insert ". iPad ".
Press replace + F to open the search box and click replace to change the replace mode. Replace all "ibcocoatouchframework" in the XIB file with "ibipadframework.
Press seconds + S to save the changes.
2. Modify the XIB view size.
Right-click the XIB file, select "open as-> interface builder-Ios", and open it in IB mode.
Select the Root View (uiview) in the xib file, find the size option on the property panel, and change it to full iPad screen.
Now you can have an iPad version of XIB.