ZJoystick is a Cocos2D joystick extension for iOS. This component can be used to either iPhone or iPad that is easy to integrate on any of your applications.
ZJoystick is an iOS component designed to provide developers a ready made joystick they can use in their game apps. It mimics the actual joystick control that are used in games -mostly arcade games-.
ZJoystick is built using Cocos2D and is compatible to both iPhone and iPad.
How does ZJoystick work?
ZJoystick simply needs Sprites to represent Joystick container (Normal and Selected), the joystick control (joystick thumb) and the controlled object (sprite to move). ZJoystick also has options to set delegates, speed ratio and joystick radius.
-(void)joystickControlDidUpdate:(id)joystick toXSpeedRatio:(CGFloat)xSpeedRatio toYSpeedRatio:(CGFloat)ySpeedRatioto identify which joystick is controlling.
-(void)joystickControlBegan- gets called the moment joystick gets activated.
-(void)joystickControlMoved- gets called everytime the joystick is controlling.
-(void)joystickControlEnded- gets called the moment joystick gets deactivated (finished using).
See the complete tutorial on how to use the ZJoystick component here: http://zaldzbugz.posterous.com/first-article