为什么图像被弄乱了?我的高度设置为130,宽度设置为130,使用预览模式时看起来不错,但是由于某种原因,图像被压缩到很小的空间,尺寸也被压缩。我已经剪裁到子视图,但是仍然很混乱。为什么?我该如何解决?

Image of how the constraints look like

Image of how the button image looks like on the phone

userpic.contentMode = .ScaleAspectFill

最佳答案

据我了解您的问题,只是尝试解决它...


  ForAllObject.contentMode =缩放以填充


ios - 为什么按钮图像被压缩?-LMLPHP

我认为,这会有所帮助...

关于ios - 为什么按钮图像被压缩?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34033043/

10-11 00:32