Why does a PNG image sometimes get blurry depending on its position in a view

前端 未结 3 1183
渐次进展
渐次进展 2021-02-09 12:39

I have noticed that when placing PNG images into a view using IB and/or animating those images to various positions around a view, the image can sometimes get a slight blur.

3条回答
  •  独厮守ぢ
    2021-02-09 13:13

    I had a similar experience with blurred text in a label, and it was caused by the superview of my labels having a subpixel offset. So even though the location within that view was integral, when adjusted to its parent's coordinates it had a half pixel or so offset, causing the blur.

    If you're getting this only sometimes, though, that might not be the case. Is your superview moving around, or positioned strangely? I'd say the best thing to do is to figure out the precise circumstances under which this is happening.

提交回复
热议问题