Swift : updating an image

I have an app, where on one view it asks for a grid size
it then loads another view, and calls a routine (onAppear) the creates an on the fly UIImage
with a grid the size the user requested… or that is what it is SUPPOSED to do.

The first time, it does if correctly. If I pop that view and go back to the view that ask the size, and select another size, the image DOES NOT change. The log says it did, but it didn’t

info is from the routine that creates the UIImage


New Image : 7x6
ImgSize=(0.0, 0.0, 1024.0, 886.2857142857143)
SafeArea=(0.0, 24.0, 1024.0, 1322.0)
R=(35.0, 35.0, 127.71428571428572, 127.71428571428572)
DONE : (1024.0, 887.0)

Second Request

New Image : 9x9
ImgSize=(0.0, 0.0, 1024.0, 1024.0)
SafeArea=(0.0, 24.0, 1024.0, 1322.0)
R=(35.0, 35.0, 97.11111111111111, 97.11111111111111)
DONE : (1024.0, 1024.0)

as you can see the first creates a 1024x887 image with a grid 7x6
the 2nd “says” it created a 1024x1024 image with a grid 9x9 but I still see a 7x6

If I go from BIGGER to Smaller it does seem to work, but not smaller to bigger

Solved… I needed to add the equivalent of “view.refresh”…