/Joystick

Example of a bindings-enabled NSView subclass.

Primary LanguageObjective-CMIT LicenseMIT

Joystick

This project demonstrates how to create a bindings-enabled NSView subclass. The basic idea for the app comes from an Apple sample project, but the code is original.

Structure

The app uses a very simple Model-View-Controller architecture, with the model being PGPolarCoordinate, the controller being PGJoystickController, and the view being PGJoystickView. The main window UI is in MainMenu.xib, including the establishment of most bindings.

Since the point of the project is to create a bindings-enabled view, most of the interesting stuff is in PGJoystickView. In particular, see the Bindings section of the implementation, which is denoted by a #pragma mark.

License

All code is licensed under the MIT license. Do with it as you will.