Search code examples
iosuiimageviewuiimageios7calayer

Strange bug in iOS 7 UIImage (not showing or showing after delay)


Every time when we add UIImageView or simple UIView with some custom CALayer objects added to "layer" property to view hierarchy, there are some different scenarios:

1) all images (in uiimageviews and calayer) are drawn with random delay 2) some images are drawn, but some not, when we perform a simple touch event anywhere - they appear 3) some images are not drawn and they won't appear after simple touch events, the only way make them to appear is to minimize the app and to expand it again.

The last case appears much less than two others. That problem occurs only on iOS7, iOS 4.3-6.1 is totally OK. We have viewed a lot of possible solutions but they were pretty primitive and none of those helped.

Any help would be appreciated! Thanks in advance!


Solution

  • we solved the problem. For everyone, who has the same problem, - all you need is to create CALayer and UIImageView objects on main thread, while UIImage objects still could be created in background thread. All these fixes are needed only in iOS 7