开发者

Can't create iPad XIB with Xcode 4

Alright, I have a problem on my hands. I'm trying to convert my project to a universal app for the iPhone and th开发者_如何学Pythone iPad. I'm trying to make iPad-specific versions of my XIB files. As it's not possible to Create iPad version using autoresizing masks in Xcode 4, I assumed I'd just be able to pop my XIB into Xcode 3's version of IB, and let that do the magic. No dice. Here's the error I get when i try to open the XIB file in IB:

Can't create iPad XIB with Xcode 4

To be honest I don't know where to proceed from here. I guess I could just resize my views manually, but that's quite tedious and I don't really have the time to be doing that. Any ideas?


Alright, I figured out a rather convoluted workaround.

First of all, duplicate your original project and then select your project info. Right-click on your target, and select "Duplicate".

Can't create iPad XIB with Xcode 4

Xcode will then pop up this message. Select "Duplicate and Transition to iPad".

Can't create iPad XIB with Xcode 4

Now Xcode converts the XIB files for you, and presents you with an iPad resources folder.

Can't create iPad XIB with Xcode 4

Now open these XIB files in the Finder, and append ~ipad after the file name.

After doing so, copy these XIB files back into your original project, and then turn your project into a universal project by selecting from the dropdown in your target settings.

Can't create iPad XIB with Xcode 4

And you're done. I found that really convoluted, and I'm hoping Apple can fix this huge usability problem soon.


This should not happen. One way to fix this problem would be t completely remove the Xcode 4 Installation and re install it from scratch . And then re install it.

Use the following command to uninstall and re install Xcode 4

sudo [xcode-path]/Library/uninstall-devtools --mode=all

PS: If you are creating projects in Xcode 4 that you also want to open in Xcode 3 make sure you keep Document Versioning section to Interface Builder 3.1

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜