无法为iPad或iPhone加载单独的XIB [英] Trouble with loading a separate XIB for iPad or iPhone

查看:138
本文介绍了无法为iPad或iPhone加载单独的XIB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法弄清楚如何在通用应用中为iPad或iPhone加载单独的XIB。

Im having trouble figuring out how to load a separate XIB for iPad or for iPhone in a Universal app.

很容易将Xcode项目转换为Universal和有单独的主视图接口。

Its easy enough to convert the Xcode project to Universal and have separate Main view interfaces.

我的问题是辅助视图,让它为iPad和iPhone提供单独的界面。

My problem is the secondary view and getting it to have separate interfaces for both iPad and iPhone.

请提供任何帮助,因为我一直在处理这个问题,但没有成功。在此先感谢!

Please offer any help you can give as I have been working on this issue for days without success. Thanks in advance!

推荐答案

我知道@ indragie的答案很常见,但这是一个常见的误解,会导致你比实际需要做的工作多得多。

I know that @indragie's answer is a very common one, but it's a common misunderstanding that will cause you a lot more work than you actually need to do.

只要您以某种方式命名xib文件,它们就会自动选择iPhone或iPad。在另一篇文章中查看我对同一问题的回答:

As long as you name the xib files a certain way, they will be automatically selected for either iPhone or iPad. Check out my answer to this same problem on another post:

iOS:使用设备修饰符加载xib文件?

这篇关于无法为iPad或iPhone加载单独的XIB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆