从 iPhone 类加载 iPad nib
我有一个通用应用程序。 iPhone 的所有代码都是我写的。不,我不想重写完全相同的代码,而是想要专门的 xib 文件。如何设置这个新的 xib 文件。如何创建它们以及如何将它们链接到我的 iPhone 类。那么我如何加载它们,这意味着让应用程序选择 iphone xib 或 ipad xib
提前谢谢 注意,我使用的是 Xcode 3
I have a universal app.
I wrote all the iPhone code. Noe, rather than rewrite the code exactly the same, I would like to just have specialized xib files. How do I set up this new xib files. How to I create them and how do I link them to my iPhone classes. then how do I load them, meaning make the app pick the iphone xib or the ipad xib
thanks in advace
Note, I'm using Xcode 3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您使用 alloc init 实例化控制器时,使用 initWithNibName 并使用与项目关联的 nib 或 .xib 名称。
when you instantiate you controller using alloc init , Use initWithNibName and use the nib or .xib name you to associate with project.
嗯,你说“我有一个通用应用程序”,但听起来你的意思是“我有一个 iPhone 应用程序,想要创建一个通用应用程序”。如果是这样,这里是我第一次执行此操作时使用的一些信息:
http://iphonedevelopment.blogspot.com/2010/04/converting-iphone-apps-to-universal.html
我认为 Jeff Lamarches 的东西相当可靠。
hmm, you say "I have a universal app", but sounds like you mean "I have an iPhone app and want to create a Universal App". If so, here is some info I used the first time I did this:
http://iphonedevelopment.blogspot.com/2010/04/converting-iphone-apps-to-universal.html
Jeff Lamarches stuff is pretty reliable I think.