Xib 适用于不同的 iOS 设备/模拟器? [英] Xib for different iOS devices/simulator?

查看:58
本文介绍了Xib 适用于不同的 iOS 设备/模拟器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行模拟器,我去硬件和设备,它显示设备列表

I run the simulator, I go to Hardware and Device, it shows list of Devices

iOS Simulator > Hardware > Device


iPad
iPad (Retina)

iPhone
iPhone (Retina 3.5 inch)
iPhone (Retina 4 inch)

我想为所有这些设备制作不同的 XIB.但我想知道方法.我看到 Xib 属性检查器中有两个选项

I want to make different XIBs for all these devices. But I want to know the way. as I see there are two options in Xib Attribute Inspector

Xib Attribute Inspector > Size

Freeform
Retina 3.5 Full Screen
Retina 4 Full Screen

虽然有

iPhone/iPod Touch 320x480
iPhone/iPod Touch having retina display 640x960
iPhone/iPod touch 5th 640x1136
iPad with non retina display 768x1024
iPad With retina display 1536x2048
iPad mini 768x1024

`我应该如何处理模拟器中显示的上述给定设备的 Xib 以及它如何覆盖所有 iOS 设备?

` How should I handle Xibs for above given Devices shown in simulator and how it covers all the iOS devices?

推荐答案

您可以获得自动调整大小的正确教程 此处.

You can get right tutorial for autoresizing here.

只保留两个xib

1) 对于 iPhone,尺寸应为 320x480(3.5) 或 320x568 (4.0)
2)适用于尺寸为 768x1024 的 iPad.

1) For iPhone that should be of size 320x480(3.5) OR 320x568 (4.0)
2)For iPad that should be of size 768x1024.

管理iphone和ipad的同名图片,在扩展名前用前缀区分.

Manage Images for iphone and ipad with the same name differentiating it with prefix before extension.

喜欢

iphone 的 image.pngiphone 视网膜的 image@2x.png.

image.png for iphone image@2x.png for iphone retina.

更改子视图自动调整大小为

Change subViews autoresize as

检查您的 3.5 和 4.0 视图

Check your 3.5 and 4.0 view as

这篇关于Xib 适用于不同的 iOS 设备/模拟器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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