简体   繁体   English

UIImageView驻留在视网膜4“

[英]UIImageView gets resides on retina 4"

I've designed layout for controller in IB, but UIImageView gets resized on Retina 4, height is increased. 我在IB中为控制器设计了布局,但是在Retina 4上调整了UIImageView的大小,增加了高度。 Here's how it looks(Retina 3.5 and Retina 4). 这是它的外观(Retina 3.5和Retina 4)。

在此输入图像描述

在此输入图像描述

As you can see image view overlaps other views on Retina 4. How do I make the size consistent? 如您所见,图像视图与Retina 4上的其他视图重叠。如何使大小保持一致?

This is probably related to your autoresizing mask in IB. 这可能与IB中的自动调整遮罩有关。

Be sure you don't allow height to be autoresized. 请确保您不允许高度自动调整。 Here's how it should look in the size inspector in IB: 以下是它在IB中的尺寸检查器中的外观: 在此输入图像描述

Any other resizing you want can be done here as well (you might not want it to stretch horizontally either, or whatever). 你想要的任何其他大小调整也可以在这里完成(你可能不希望它也可以水平拉伸,或者其他任何东西)。

Alternatively, you can remove 'Autoresize subviews' via the attributes of this image view's parent view. 或者,您可以通过此图像视图的父视图的属性删除“自动调整子视图”。

EDIT: Ignore the frame (obviously), this is from my own project ;) 编辑:忽略框架(显然),这是来自我自己的项目;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM