开发者

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 clas开发者_C百科s_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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜