Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import "control.h"
- %hook SBVolumeHardwareButtonActions
- -(void)volumeIncreasePressDown {
- static BOOL active = NO;
- if (active == NO) {
- active = YES;
- } else if (active == YES) {
- [[%c(SBMediaController) sharedInstance] changeTrack: 1];
- active = NO;
- }
- }
- //Create a double volume doswn click
- -(void)volumeDecreasePressDown {
- static BOOL active = NO;
- if (active == NO) {
- active = YES;
- } else if (active == YES) {
- [[%c(SBMediaController) sharedInstance] changeTrack: -1];
- active = NO;
- }
- }
- %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement