1. Change the iPhone program to an iPad Program
1. First set the target info: reduce the basesdk version to 3.2 to ensure that the program runs on the iPad Program; and set targeted device family to iPhone/iPad; set iPhone OS Deployment target to iPhone OS 3.1.3 or lower.
2. Set Simulator to iPad and run !~
2. Convert the iPhone program into a universal program
1. select target and execute project-> upgrade current target to iPad.... In xcode, a dialog box is displayed, in which two modes are selected: one universal application and two device-specific application. If you select the universal mode, a target of the universal is generated. As devices run differently, the universal program will choose to call different style files. Because it is based on the same set of code, you can judge different devices according to the following method:
If (ui_user_interface_idiom () = uiuserinterfaceidiompad)
{
Controller = [[mycontroller alloc] initwithnibname: @ "myipadnib" Bundle: Nil];}
Else
{
Controller = [[mycontroller alloc] initwithnibname: @ "myipodnib" Bundle: Nil];
}
<? XML: namespace prefix = o ns = "urn: Schemas-Microsoft-com: Office: office"/>
Note that the usage of controls is slightly different between iPad and iPhone, so you need to modify the code.
3. Convert the iPhone program into an iPad Program
1. Similarly, run project-> Upgrade to IPAD. Then select two device-specific application, and the compiler will generate a new target and resources for the program.
2. For interface files other than mainwindow. XIB, you can call file --> Create iPad version in interface builder to convert them to IPAD resolutions.
Haha, this conversion is relatively winding. If it has been converted to universal, it seems that it will not work if it is switched back to iPhone. Be careful!
The entire operation process is relatively difficult. You can combine the above article with the actual operation experiment.