TestsTested | ✗ |
LangLanguage | Objective C++Objective C++ |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Panos Baroudjian.
HKRewind features a UIGestureRecognizer subclass and a HUD view that help you implement a rewind gesture à la Paper by Fifty-Three.
HKRewind uses Auto-layout, which makes it iOS6+ compatible only. It should be noted that HKRewind uses HKCircularProgressView (version 1.1.0)
Import HKRewindGestureRecognizer.h", add an instance of this recognizer to your view and use it as you would with any subclass of UIGestureRecognizer. If you want to use the HUD view import *HKRewindHUD.h, create a HUD for your view with the HUDForView:(UIView *)view method and show/hide it with showHUDAnimated:(BOOL)animated and hideHUDAnimated:(BOOL)animated.
For a simple example, pleaser refer to the HKRewindViewController class in this repository.
HKRewindGestureRecognizer emits 3 UIGestureRecognizerStates: UIGestureRecognizerStateBegan (this is when you should show the HUD), UIGestureRecognizerStateChanged (this is when you should use the rotationDelta property in order to update the HUD) and UIGestureRecognizerStateEnded (this is when you should hide the HUD).
You can customize the behavior of the gesture recognizer by editing those properties:
In order to retrieve the information provided by the gesture recognizer, use those properties:
You should not init HKRewindHUD like a normal view, but instead you should use the + (instancetype)HUDForView:(UIView *)view method. Show and hide the HUD with showHUDAnimated:(BOOL)animated and hideHUDAnimated:(BOOL)animated.
You can customize the behavior of the HUD by accessing and editing those properties: