应用平台规范
我正在为 iphone 和 iphone 设计一个应用程序。 ipod 客户希望 iphone 和 iPod 的某些 UI 规范有所不同,因此我决定为 iphone 和 iPod 创建不同的 XIB 文件,就像在 iphone 和 iPod 的通用应用程序中一样,但问题是我无法区分 iphone 和 iPod运行时的 ipod 有没有办法在运行时检查平台,以便在运行时加载不同的 Nib 文件 如果有任何代码或教程,请引导我访问链接 提前致谢
I am designing an app for iphone & ipod the client wants the Some of the UI Specification for iphone and ipod to be different so i decided to create different XIB Files for iphone and ipod as in universal apps for iphone and ipod but the problem is that i am not able differentiate between iphone and ipod on run time is there any way to check platform on runtime so as to load different Nib Files on runtime
If there is any code or tutorial please guide me to the link
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
[[UIDevice currentDevice] model] 看起来像是此信息的正确来源。您可以检查它是否包含 iPod Touch 或 iPhone 或......
[[UIDevice currentDevice] model] looks like the right source for this Information. You can check it if it contains iPod Touch or iPhone or.....
检查 UIDevice 类的模型属性
http:// /developer.apple.com/library/ios/#documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html
但是,如果您打开该字符串,请注意模拟器会显示为单独的 设备。
这:
输出:
Check the model property of UIDevice class
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html
However, if you switch on that string, be aware that the simulator shows up as a separate device.
This:
Outputs:
我认为这已经被问过好几次了。)
型号字符串的可能示例是@“iPhone”和@“iPod touch”
I think this was already asked several times .)
Possible examples of model strings are @”iPhone” and @”iPod touch”