objective-cikimagebrowserview

IKImageBrowserView Thumbnail Problem


I download IKImageBrowserView sample named "IKImageKit Demo" from Apple official website.

But I find a problem.

For example:

When I import images from folder named "A", then I delete an image.

Then I import other image (name as same as the deleted image), the thumbnail in

IKImageBrowser will not change.

How could I resolve this problem?? Thanks!

Video display: http://www.youtube.com/watch?v=f3Jue9wOdUI


Solution

  • Update: Wow, old post. Looks like the documentation was updated a while after I had posted; as the other answers suggest, looks like you need to increment the image's imageVersion to update an image from cache.


    After mulling over the problem for close to three hours (once I started, it was really bugging me, too!), I came to the sad conclusion that it's a bug in how IKImageKit handles images. IKImageBrowserView has a cache of images and thumbnails, and from whatever experimental data I have, I'm guessing that it just caches its images based on location on disk, and not on image data (so it can load the data lazily, I guess), so even if the actual image data can change, reloading the same file location will not update the image itself.

    Of course, I could be completely wrong - which wouldn't surprise me, since there's literally no documentation on the issue, so I have nothing but results from Instruments and the app itself to guide me - but my advice to you is to ignore the issue for now, since there's nothing you can do about it, and possibly file the bug with Apple.

    Of course, if anyone can introduce other evidence about this, please do! I'd love to know more about it.
    Good luck!