Advertisement
princetechn0

Untitled

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