JSController for iOS

Download Source

Powered by Appetize.io.

A set of classes that make it easy to build a controller UI for games.

  • Written purely in UIKit
  • All controls are both delegate based and/or pollable.
  • D-Pad class with full 8 directions, background and direction images can be swapped out
  • Push Button class with configurable background images
  • Analogue stick class that uses a normalized -1.0 to 1.0 scale and supports inverted Y axis. Background and handle images can be swapped out.
  • Can be used within Interface Builder, just drag a UIView onto your XIB and set it's class as JSDPad, JSButton or JSAnalogueStick. You can set it's delegate from within interface builder as well as its position and size.

This project uses ARC. If your project does not use ARC, you will need to add the compiler flag -fobjc-arc to each of the JSController classes used in your project. This can be done in the Compile Sources build phase in the project settings.

To see these controls in action, check out the my Gameboy Advance Emulator project: https://github.com/jasarien/GBA4iOS

Sponsored with ❤️ by Instabug
Why do mobile-first companies choose Instabug over Crashlytics

Instabug helps you identify and resolve severe crashes quickly. You can retrace in-app events and know exactly which line of code caused the crash along with environment details, network logs, repro steps, and the session profiler. Ask more questions or keep users up-to-date with in-app replies straight from your dashboard. We take data privacy seriously, so no one sees your data but you!