Animated UIImageViews showing as 'Color Misaligned Images' in Instruments CoreAnimation profile

StackOverflow https://stackoverflow.com/questions/20710461

  •  20-09-2022
  •  | 
  •  

Question

In my app I have a series of UIImageViews that are being animated via CAKeyframeAnimation and a set of preset 'UIBezierPaths'. All the images are showing in Instruments as being 'Color Misaligned Images'.

All the pngs contained within the UIImageViews are pixel perfect.

Even using a standard UIVIew animation block produces misaligned images.

After spending all day trying to fix the misalignments with no joy I am being to think that this is perfectly normal for animated UIImageViews.

Can anyone confirm that this is the case or suggest a potential fix.

Thanks in advance

Paulh.

Was it helpful?

Solution

During the animation, the image views are probably being aligned at non-integer coordinates. This would be the best way to provide smooth animation, otherwise a very short distance animation that only moves a handful of pixels would just appear to jump over a pixel at a time occasionally during the animation. So I wouldn't worry about this at all, especially if it isn't misaligned when not animating. This sounds like expected behavior, and you would probably have to handle the animation yourself and cast all of the pixel coordinates to integer values along the way to make it not do this, and it probably wouldn't look as smooth then.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top