Ad

Our DNA is written in Swift
Jump

Radar: UIImageView in UIScrollView Compositing Flashing

I filed this Radar already back in December, without a sample. Now an Apple engineer requested that I provided one. So I did.

The problem is that a scrollview misaligns a content image if you pinch-to-zoom causing white lines to appear along the right and bottom edges.

Filed as rdar://19323748 and on OpenRadar.

Summary

An image view as content of a scroll view shows flashing white lines at the right and bottom corners while being zoomed.

Steps to Reproduce

  • Have a single-view app that
  • has a scroll view
  • with an image view
  • that shows an image and
  • allows zooming
  • run on iPhone 6 or iPhone 6 Simulator

Expected Results

while zooming there should be no visual artefacts

Actual Results

  • while zooming white lines appear on the right and bottom edges of the image view
  • A screenshot of the problem is attached. You can see the white lines on it.

Notes

I looked if these white lines are from a background color that is “shining through”, but that does not appear to be the case. A workaround I found is that you can set the image view’s layer’s border width to 2.0 and the border color to black. This will mask the white lines.

Image Compositing Bug

The sample app CompositionBug is available on my RadarSamples GitHub repo.


Categories: Bug Reports

1 Comment »

  1. Good day! Do you have an update regarding this? If it is already fixed?

    Thanks,
    Mary Anne