I have a UIScrollView with paging enabled. All the images were loaded at the start and added to the UIImageViews, but I had a memory-issue as it were more images, so I decided to load the after next image while scrolling if the image isn't set yet. If i get a memory warning, I remove all images except of the current.
The problem is, that the scrollview hangs for a few milliseconds if I scroll.
I'm using
UIImage *image = [UIImage imageNamed:@"path/to/image.png"];
to load the images. If I use the method imageWithContentsOfFile, it cost alot more time.
Is there a way to show a pixelated image like in the default Photoapp until it's fully loaded?
Thanks for your answers in advance.