I have different project set up for iPhone and iPAD and most of the file names in these two projects are same. Now i would like to merge these two into one and create a Universal build. Is there any tutorial or a better way to handle this without reworking on the complete code.

Please help. Thanks.

有帮助吗?

解决方案

I already did that before. At that time, we did not have the choice to rename all the files and classes of one project. Objective-c does not have namespace, unfortunately.

Don't know how big is your project, but with rename/replace or re-factoring tool, you would be able to that without any (to much) pain.

其他提示

If you use StoryBoard, then you can choose your project and when you choose Universal, you can set two different StoryBoards for iPhone and for iPad.

So you will have an application which initialize it according to iOS device.

And if you have same class names, I suggest you to change one of those with one character difference (eg. ViewController and PViewController (P for phone..)) and refactor all related class according to it.

Good luck!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top