質問

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