Re: Invalidating UIImageView's image cache

2020-09-23 Thread Carl Hoefs via Cocoa-dev
Yes! +[UIImage imageNamed:] was The Caching Culprit™️. I was barking up the wrong object (UIImageView). As per Eric's suggestion I've switch to +[UIImage imageWithContentsOfFile:], and now there's no image caching (as per Mike's suggestion to RTM: "This method does not cache the image object".

Re: Invalidating UIImageView's image cache

2020-09-23 Thread Mike Abdullah via Cocoa-dev
Correct, this is your issue. Have a read of the docs on +[UIImage imageNamed:] They explicitly discuss the cache. This is not the API you want. Mike. > On 23 Sep 2020, at 02:12, Eric Lee via Cocoa-dev > wrote: > > Ah maybe it is the use of `imageNamed:`. I believe that caches the image >

Re: Invalidating UIImageView's image cache

2020-09-22 Thread Alex Zavatone via Cocoa-dev
It’s probably getting the same image from within the bundle based on the path. > On Sep 22, 2020, at 8:12 PM, Eric Lee via Cocoa-dev > wrote: > > Ah maybe it is the use of `imageNamed:`. I believe that caches the image > data in a system cache. Have you tried `imageWithContentsOfFile:`? >

Re: Invalidating UIImageView's image cache

2020-09-22 Thread Eric Lee via Cocoa-dev
Ah maybe it is the use of `imageNamed:`. I believe that caches the image data in a system cache. Have you tried `imageWithContentsOfFile:`? https://developer.apple.com/documentation/uikit/uiimage/1624123-imagewithcontentsoffile > On Sep 22, 2020, at 16:56, Carl Hoefs wrote: > > >> On Sep 22

Re: Invalidating UIImageView's image cache

2020-09-22 Thread Carl Hoefs via Cocoa-dev
> On Sep 22, 2020, at 1:46 PM, Eric Lee via Cocoa-dev > wrote: > >> I don't have a good answer, but I think this may be more that UIImage caches >> the images, not UIImageView. Maybe you can find something in UIImage's >> docs/headers? > > I think you may be on to something. This WWDC > <

Re: Invalidating UIImageView's image cache

2020-09-22 Thread Eric Lee via Cocoa-dev
> I don't have a good answer, but I think this may be more that UIImage caches > the images, not UIImageView. Maybe you can find something in UIImage's > docs/headers? I think you may be on to something. This WWDC session covers optimiz

Re: Invalidating UIImageView's image cache

2020-09-21 Thread Uli Kusterer via Cocoa-dev
On 2. Sep 2020, at 02:40, Carl Hoefs via Cocoa-dev wrote: > I've tried setting UIImageView.image=nil, UIImageView.animationImages=nil, > toggling UIImageView.hidden, wiping the sandbox, etc., but no joy. Of course, > restarting the app does force-flush the cache, but that's a no-go. > > The on

Invalidating UIImageView's image cache

2020-09-01 Thread Carl Hoefs via Cocoa-dev
Q: What is the proper way to invalidate UIImageView's image cache? - - - I have an iPad app that generates a series of medical analysis UIImages in the ~/Documents area of the sandbox. I then display those images in an automated sequence on the GUI. Each time the app runs through its processin