使用 UIViewContentModeScaleAspectFill 剪切到边界

发布于 2024-09-25 12:19:26 字数 114 浏览 1 评论 0原文

有什么方法可以控制 UIViewContentModeScaleAspectFill 剪辑图像的位置?就我而言,图像总是在图像中心周围被剪裁。是否可以将其夹在顶部?

谢谢!

安东尼奥

is there any way of controlling where UIViewContentModeScaleAspectFill clips an image? In my case, images are always clipped around the center of the image. Is it possible to make it clip around the top?

Thanks!

Antonio

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人心善变 2024-10-02 12:19:26

UIViewContentModeScaleAspectFill 的当前实现确实是如您所指出的那样将图像居中,据我所知,无法改变这种行为。

The current implementation of UIViewContentModeScaleAspectFill is indeed to center the image as you pointed out, to my knowledge there's no way of altering this behavior.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文