RobotUIKit API
|
View class showing a "puck" that responds to flicking gestures from the user. More...
#import <RUIFlickView.h>
Public Member Functions | |
(void) | - addTarget:action: |
(void) | - setPuckImage: |
(void) | - setFlickEnabled: |
(void) | - commonInit |
(RUIFlickGestureRecognizer *) | - getRecognizer |
Properties | |
double | speed |
double | heading |
When the puck is flicked, any specified targets receive an action call where they can check for the speed and heading of the puck.
- (void) addTarget: | (id) | target | |
action: | (SEL) | action | |
Add a target object that performs the given selector when the puck is flicked.
target | The target object to send the selector to when the puck is flicked. |
action | The selector to call on the target when the puck is flicked. The selector should take a single argument that is the flick view that caused the selector to be called. |
- (void) commonInit |
Used in subclasses to override common behaviors. Be sure to call [super commonInit]
- (RUIFlickGestureRecognizer*) getRecognizer |
Used to get the gesture recognizer in case you need to require other recognizers to fail
- (void) setFlickEnabled: | (BOOL) | enabled |
Used to disable the flick guesture recognizer so you can do other detection with the puck.
- (void) setPuckImage: | (UIImage *) | image |
Set the puck image to the given image.
image | The image to show on the puck. |
- (double) heading [read, assign] |
The heading of the puck in radians (see atan2)
- (double) speed [read, assign] |
The current relative speed of the puck.