Converting an iPhone NIB to iPad NIB in Xcode 5

给你一囗甜甜゛ 提交于 2019-11-30 16:21:58

问题


I'm working on a universal app.

Well there's this: Converting iPhone xib to iPad xib? and also this: Xcode 4 .xib Create iPad Version.

Am I the only one that still doesn't manage to convert my nib to iPad? I refresh Xcode and under "size" still only see Retina 3.5 and Retina 4. I even used two of the SO questions scripts attached as answers and still remain with the same iPhone nib...

Please help!


回答1:


I was just having this same problem! I use that answer all the time regarding editing the file in a text editor and it wasn't working. I did a quick compare and the new difference appears to be this:

targetRuntime="iOS.CocoaTouch" 

It's on the second line. It needs to be changed to

targetRuntime="iOS.CocoaTouch.iPad" 

Then you can select the right Size in Interface Builder :o)




回答2:


If you're using Xcode 6/ iOS8, take a look at size classes for this.



来源:https://stackoverflow.com/questions/19838044/converting-an-iphone-nib-to-ipad-nib-in-xcode-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!