Advertisement
princetechn0

Untitled

Feb 24th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #import "control.h"
  2.  
  3.  
  4. %hook SBVolumeHardwareButtonActions
  5.  
  6.  
  7. -(void)volumeIncreasePressDown {
  8.  
  9.  
  10. static BOOL active = NO;
  11.  
  12. if (active == NO) {
  13.  
  14.  
  15. active = YES;
  16.  
  17. } else if (active == YES) {
  18.  
  19. [[%c(SBMediaController) sharedInstance] changeTrack: 1];
  20.  
  21. active = NO;
  22. }
  23.  
  24. }
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. //Create a double volume doswn click
  33.  
  34. -(void)volumeDecreasePressDown {
  35.  
  36. static BOOL active = NO;
  37.  
  38. if (active == NO) {
  39. active = YES;
  40.  
  41. } else if (active == YES) {
  42.  
  43. [[%c(SBMediaController) sharedInstance] changeTrack: -1];
  44. active = NO;
  45. }
  46.  
  47. }
  48.  
  49.  
  50.  
  51. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement