简体   繁体   English

Imageview中使用的图像的颜色变化

[英]Colour Variation in images used in Imageview

I have an imageview in my app and I set the image of that imageview using interface builder. 我的应用程序中有一个imageview,并使用界面生成器设置了该imageview的图像。

This is my problem: 这是我的问题:

The actual image is this 实际的图像是这个

实际的图像是这个

But in simulator its color have a variation and displays this 但是在模拟器中,它的颜色会有变化并显示

但是在模拟器中,它的颜色会有变化并显示

Please not the colour variation in it. 请不要在其中的颜色变化。 What may be the reason?Any solution? 可能是什么原因?任何解决方案?

The reason for this, the size different between your image and Your ImageView . 原因是your imageYour ImageView大小不同 Actually, Here your image is stretched , that's why, It appear like this. 实际上,在这里您的图像被拉伸了 ,这就是为什么,它看起来像这样。 You can solve this problem by resizing your image with code. 您可以通过使用代码调整图像大小来解决此问题。 Use this link to resize 使用此链接调整大小

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

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