JSController for iOS by James Addyman

Download Source

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

License: BSD

Language: Objective-C

by 5 people

(Click the stars to add your rating)

Sponsored with ❤️ by Instabug
Understand How Your App is Doing with Real-Time Contextual Insights From Your Users
Instabug

Receive bug reports that automatically capture all app details; network requests, repro steps, and session details. And get real-time crash reports with stack trace details up to the line that caused the crash to help you catch and fix issues much faster. It takes less than a minute to integrate the SDK and you can forward all issues to your favorite tools like: Jira, slack and many more. This is just the beginning!