简体   繁体   English

ImageEdgeInsets方形长宽比

[英]ImageEdgeInsets Square Aspect Ratio

Is it possible to use ImageEdgeInsets to constrain an image to a square size? 是否可以使用ImageEdgeInsets将图像约束为正方形大小? I have a UI Image inside of a button and I would like to make it a square size inside the button. 我在按钮内有一个UI图像,我想使其在按钮内为正方形。 Does ImageEdgeInsets offer the ability to maintain an aspect ratio? ImageEdgeInsets是否提供维持长宽比的功能? Thanks! 谢谢!

要保持宽高比,您应该在这里看看(它不使用ImageEdgeInsets)

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

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