JSController for iOS

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
Instabug: Understand how your app is doing with real-time contextual insights from your users
Instabug

Get all the logs you need and fix bugs, crashes, and other issues in minutes instead of days. With Instabug you will automatically receive device data, network logs, and reproduction steps with every bug and crash report. It only takes a line of code to integrate and is perfect for teams that are now working remotely. See more detailed features comparison and try Instabug for free here.