[英]uiimageview aspectfill issue
aspectfill
is not the issue. aspectfill
不是问题。 The problems is in your autolayout
. 问题出在您的自动
autolayout
。 Select all your image views in storyBoard and embed them in stack view with proper constraints. 在StoryBoard中选择所有图像视图,并在适当的约束下将它们嵌入堆栈视图。
To achieve this, Select all image view then go to 为此,请选择所有图像视图,然后转到
Editor > Embed In > Stack View
编辑器>嵌入>堆栈视图
For each of your UIImageView
make sure to enable clipSubviews
in Interface Builder. 对于每个
UIImageView
,请确保在Interface Builder中启用 clipSubviews
。
What happens is that your view
s are positioned and sized properly, but since the contained image
is bigger than the containing view it will bleed out outside of the view boundaries. 发生的情况是您的
view
的位置和大小正确,但是由于包含的image
大于包含的视图,因此它将在视图边界之外渗出 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.