xcode iphone project and ipad project into universal app

If I have a project that was written for iphone and a project written for ipad. Is there a recommended way to combine them into a universal app?

My understanding is that you would take the existing app (iphone project) and convert it to a universal app then rename the classes to class_iphone, class_ipad etc.

The process of coverting includes xcode generating a new MainWindow nib for the ipad and other related files... But this sound painful to go into the project and duplicate the files etc..

please advise.


You may have to rename your NIBs to be iPhone and iPad specific, but you shouldn't have to do that with your classes. I am not saying that it won't be painful - just that it will be a different kind of pain. You will need to wrap certain code in:

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    {
    }
else
    {
    }

And you will need to be careful about classes (like UIPopoverController) that are specific to iPads.

链接地址: http://www.djcxy.com/p/17148.html

上一篇: 为iPad配置应用程序

下一篇: xcode iphone项目和ipad项目纳入通用应用程序