NSImageView does not animate


Gerriet M. Denkmann
 

macOS 11.2.1

Some app which shows animated gifs, and which has been working just fine, now is not.

@IBOutlet var catImageView: NSImageView!

func applicationDidFinishLaunching(_ aNotification: Notification)
{
let image = NSImage.init(byReferencingFile: Bundle.main.path(forResource: "Sleeps", ofType: "gif")! )
catImageView.image = image
catImageView.animates = true
}

I see just one cycle of frames of the gif-sequence, then it stops moving.
The gif has two images which should keep alternating.

When I look at my gif in Xcode, it behaves absolutely normal.

What can I do to fix this?


Gerriet.