Testing how to animate a NSBox on the screen.
✓ Published0🌍 Public
KKevinGutowski
Last edited Jun 12, 2019
Created on Jun 12, 2019
This example demonstrates how to animate a red NSBox across a macOS window using AppKit’s animation proxy. The code creates a floating NSPanel, configures it with a custom style mask, and disables the minimize and zoom buttons. An NSBox is added as a subview to the panel’s flipped content view, then its frame origin is moved via the `animator()` proxy to trigger a smooth animation. The implementation relies on `NSThread.mainThread().threadDictionary` to manage the panel’s lifecycle for repeat executions.
AI-generated description